Run CoraDB statements
execute_sqlRun one or more SQL statements in one transaction, committing only when every statement succeeds and rolling back otherwise; use dryRun to preview changes without saving.
Instructions
Run any statements — INSERT, UPDATE, DELETE, MERGE, CREATE, ALTER, DROP, SELECT … — one or several separated by ;, in order, in one transaction. If every statement succeeds, the changes are committed; if any fails, nothing is saved. dryRun: true runs everything and then rolls it back, to see what would change. Returns the rows of each SELECT and the number of rows each other statement changed. COMMIT and ROLLBACK statements are refused: the call controls the transaction. Serial increments (AUTO_INCREMENT, NEXT_VALUE) are not undone by a rollback.
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": {
"sql": "<sql>",
"database": "<database>"
},
"name": "execute_sql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One or more statements separated by ;. | |
| host | No | CoraDB broker host. Default: localhost. | |
| port | No | CoraDB broker port. Default: 33000. | |
| user | No | Database user. Default: dba. | |
| dryRun | No | true: run everything, then roll it back (nothing is saved). Default false: commit when every statement succeeds. | |
| params | No | Values for the ? placeholders of a single statement, in order. | |
| maxRows | No | Most rows to return per SELECT (default 200, at most 5000). totalRows still reports the full count. | |
| database | Yes | The database to open. | |
| password | No | Password of that user. Default: empty. | |
| timeoutMs | No | Time limit for the whole call, in milliseconds (default 120000, at most 600000). When it runs out the running statement is cancelled on the server, the rest are skipped and everything is rolled back. |