call_api
Executes a Bytebase API operation to query databases or propose changes using an operationId and optional JSON body; first use search_api to retrieve the operation schema.
Instructions
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", "statement": "SELECT 1"})
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": {
"operationId": "<operationId>"
},
"name": "call_api"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | ||
| operationId | Yes |