write_query
Execute INSERT, UPDATE, DELETE, and DDL statements on a specified database connection, with multi-statement transactions and confirmation required for destructive operations.
Instructions
Run INSERT/UPDATE/DELETE/DDL. Requires an exact connection name or id. Several statements in one string run on one connection; more than one write is wrapped in a transaction.
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": {
"name": "<name>",
"query": "<query>"
},
"name": "write_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Exact connection name or id (no partial matching for writes) | |
| query | Yes | Mutating SQL (one or more statements) | |
| confirm | No | Required (true) for destructive statements: DROP, TRUNCATE, ALTER SYSTEM, or DELETE/UPDATE without WHERE | |
| timeoutMs | No | Statement timeout in ms (default 30000) |