propose_database_change
Propose and run DDL/DML changes against a Bytebase database by submitting plain SQL; it creates the sheet, plan checks, and issue in one call.
Instructions
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 | SQL statement(s) in plain text (NOT base64) |
title | Yes | Title for the issue/plan |
instance | No | Workspace instance ID/name, or the full canonical name for a project instance |
project | No | Project name or ID to narrow resolution |
changeType | No | "MIGRATE" (default) or "SDL" |
createRollout | No | If true, attempts rollout creation after issue |
reason | No | Context or ticket reference (max 1000 chars) |
Examples: propose_database_change(database="app", sql="ALTER TABLE users ADD COLUMN status VARCHAR(20)", title="Add status column") propose_database_change(database="app", sql="UPDATE orders SET status='shipped' WHERE id=42", title="Ship order 42", createRollout=true)
Notes:
It changes one database per call. For several databases in one plan, ask the user to use the Bytebase console or GitOps.
Plan checks run automatically; results included in response when available.
Requires bb.sheets.create, bb.plans.create, bb.issues.create permissions.
If createRollout=true but policy gates aren't satisfied, returns success with rolloutCreated=false and a reason.
nextAction AWAIT_HUMAN_APPROVAL means the issue waits for its approvers. If the user is one of them, decide_issue asks them to confirm in this client and then approves; otherwise share links.issue with an approver.
Masked data: a masked column reads back as "******". That is a placeholder, not a value anything holds. Any change containing it is refused, because writing it back would overwrite the real value. Ask a human to make the change in the Bytebase console instead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"database": "<database>",
"sql": "<sql>",
"title": "<title>"
},
"name": "propose_database_change"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| title | Yes | ||
| reason | No | ||
| project | No | ||
| database | Yes | ||
| instance | No | ||
| changeType | No | ||
| createRollout | No |