Bytebase
v0.1.1Query, inspect, and change databases through Bytebase's governed workflow with audit logging.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
administer_workspace
Make a workspace administration change that the user confirms in this client first. It takes a Bytebase API operation and its request body, as search_api describes them. | Parameter | Required | Description | |-------------|----------|-------------| | operationId | Yes | The operation, e.g. "SettingService/UpdateSetting" | | body | Yes | The operation's request body | It serves four changes. The approval rules for database changes: send SettingService/UpdateSetting with setting.name "settings/WORKSPACE_APPROVAL" and the whole rule list in setting.value.workspaceApproval.r…
| Parameter | Type | Description |
|---|---|---|
body * | object | |
operationId * | string |
call_api
Execute a Bytebase API endpoint. **Use search_api first to get operationId and schema.** | Parameter | Required | Description | |-----------|----------|-------------| | operationId | Yes | e.g., "SQLService/Query" | | body | No | JSON request body | **Resource names:** Preserve the exact canonical name returned by SearchDatabases or ListDatabases: instances/prod/databases/main for a workspace instance, or projects/my-project/instances/prod/databases/main for a project instance. **Example:** call_api(operationId="SQLService/Query", body={"name": "projects/my-project/instances/i/databases/db"…
| Parameter | Type | Description |
|---|---|---|
operationId * | string | |
body | object |
decide_issue
Approve or reject a Bytebase issue at its current approval step. The user confirms the decision in this client first. | Parameter | Required | Description | |-----------|----------|-------------| | issue | Yes | Issue name, e.g. "projects/hr/issues/42" | | decision | Yes | "approve" or "reject" | | comment | No | Note recorded with the decision | The tool shows the user what the issue changes and asks them to confirm in a form. It decides only when they accept; declining or cancelling changes nothing. A client that cannot show the form gets the issue's link, to decide…
| Parameter | Type | Description |
|---|---|---|
decision * | string | |
issue * | string | |
comment | string |
get_gitops_workflow
Return the workflow files that set up GitOps for a project. With them in the repository, every pull request that changes the migration folder gets a Bytebase SQL review, and merging it deploys. The tool reads only; it changes nothing in Bytebase. | Parameter | Required | Description | |------------------|----------|-------------| | project | Yes | The project ID, e.g. "hr" | | targets | Yes | One database group ("projects/hr/databaseGroups/all"), or one or more databases by the name ListDatabases gives ("instances/prod/databases/hr") | | workloadIdentity | Y…
| Parameter | Type | Description |
|---|---|---|
project * | string | |
targets * | null | array | |
workloadIdentity * | string | |
folder | string |
get_schema
Inspect a Bytebase database's schema. | Parameter | Required | Description | |-----------|----------|-------------| | database | Yes | Database name or substring (e.g., "employee_db" or "employee") | | instance | No | Workspace instance ID/name, or the full canonical name for a project instance | | project | No | Project name or ID to narrow resolution | | schema | No | Schema name for multi-schema engines (PG/MSSQL/Oracle/Snowflake/Redshift/CockroachDB/Databricks/Trino/Spanner/Hive); ignored with a note on MySQL/TiDB/etc. | | table | No | Drill into a…
| Parameter | Type | Description |
|---|---|---|
database * | string | |
include | string | |
instance | string | |
project | string | |
schema | string | |
table | string |
grant_masking_exemption
Exempt one member from data masking in a Bytebase project, for one database (optionally one schema, table, or columns of one table) or for every database in the project. The user confirms the exemption in this client first. | Parameter | Required | Description | |--------------|----------|-------------| | project | Yes | Project name, e.g. "projects/hr" | | member | Yes | "user:{email}", "group:{email}", "serviceAccount:{email}" or "workloadIdentity:{email}" | | database | One of | Database name, e.g. "instances/prod/databases/hr"; it must belong to the project |…
| Parameter | Type | Description |
|---|---|---|
member * | string | |
project * | string | |
allDatabases | boolean | |
columns | null | array | |
database | string | |
expireTime | string | |
reason | string | |
schema | string | |
table | string |
propose_database_change
Run DDL/DML changes (ALTER TABLE, CREATE TABLE, INSERT, UPDATE, migrations) against a Bytebase database. This is the primary tool for making database changes. Use this instead of manually calling CreateSheet/CreatePlan/CreateIssue via call_api. Provide plain SQL — the tool handles database resolution, sheet creation, plan creation with automatic plan checks, and issue creation in one call. Optionally creates a rollout. | Parameter | Required | Description | |---------------|----------|-------------| | database | Yes | Database name or substring | | sql | Yes |…
| Parameter | Type | Description |
|---|---|---|
database * | string | |
sql * | string | |
title * | string | |
changeType | string | |
createRollout | boolean | |
instance | string | |
project | string | |
reason | string |
query_database
Execute a SQL query against a Bytebase database. Resolves the database by name automatically. | Parameter | Required | Description | |-----------|----------|-------------| | database | Yes | Database name or substring (e.g., "employee_db" or "employee") | | statement | Yes | SQL query to execute | | instance | No | Workspace instance ID/name, or the full canonical name for a project instance | | project | No | Project name or ID to narrow resolution | | schema | No | Default schema for unqualified names (Postgres search path). An access grant applies only wh…
| Parameter | Type | Description |
|---|---|---|
database * | string | |
statement * | string | |
container | string | |
instance | string | |
issueTitle | string | |
limit | integer | |
project | string | |
schema | string |
reauthorize
Log out the current MCP OAuth connection so the client can run OAuth again. Use this when you need to change the connected Bytebase account or SaaS workspace. After this tool succeeds, retry the MCP request or reconnect; the server will return the normal OAuth challenge.
request_access_grant
Request an access grant: time-boxed permission to run one read-only statement on one Bytebase database, optionally with results unmasked or exported. A person approves the request in Bytebase before it takes effect. | Parameter | Required | Description | |---------------|----------|-------------| | database | Yes | Full database name, as query_database prints it after "Database:", e.g. "projects/hr/instances/prod/databases/hr" | | statement | Yes | One read-only statement; the grant applies to this exact statement | | schema | No | Default schema for unqual…
| Parameter | Type | Description |
|---|---|---|
database * | string | |
durationHours * | integer | |
reason * | string | |
statement * | string | |
container | string | |
export | boolean | |
schema | string | |
unmask | boolean |
revoke_masking_exemption
Remove one member's masking exemption in a Bytebase project. The user confirms in this client first. | Parameter | Required | Description | |-----------|----------|-------------| | project | Yes | Project name, e.g. "projects/hr" | | member | Yes | The member as the policy lists it, e.g. "user:bob@example.com" | | condition | Yes | The exemption's condition expression, exactly as OrgPolicyService/GetPolicy returns it for "{project}/policies/masking_exemption"; "" for an exemption with no condition | The member is removed from every exemption whose condition matches exactl…
| Parameter | Type | Description |
|---|---|---|
condition * | string | |
member * | string | |
project * | string |
search_api
Discover Bytebase API endpoints. **Always call before call_api - never guess schemas.** | Mode | Parameters | Result | |------|------------|--------| | List | (none) | All services | | Browse | service="SQLService" | All endpoints in service | | Details | operationId="SQLService/Query" | Request/response schema | | Schema | schema="Instance" | Message type definition | **Workflow:** search_api() → search_api(service="...") → search_api(operationId="...") → call_api(...) The results also name what no MCP session can do, whatever the workspace's MCP mode and the user's permissions, and…
| Parameter | Type | Description |
|---|---|---|
operationId | string | |
schema | string | |
service | string |
set_just_in_time_access
Turn just-in-time access on or off for one Bytebase project. The user confirms the change in this client first. | Parameter | Required | Description | |-----------|----------|-------------| | project | Yes | Project name, e.g. "projects/hr" | | enabled | Yes | true to turn it on, false to turn it off | Just-in-time access lets members request access grants in the project: time-boxed permission to run one statement, for a one-off query. With it off, new requests are refused, and active grants stop applying until it is turned on again; they are not revoked. The tool shows the us…
| Parameter | Type | Description |
|---|---|---|
enabled * | boolean | |
project * | string |