scalix_db_query
Execute a SQL query against the project database. Returns columns, rows, row count, and cost breakdown. Destructive statements (DROP/TRUNCATE/bulk DELETE) require a two-step confirmation: the first call returns code CONFIRMATION_REQUIRED with a confirmation_token — re-call with that value in confirm_token to execute.
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>"
},
"name": "scalix_db_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | SQL query to execute | |
| params | No | Bind parameters for the query | |
| timeline_id | No | F17: run the query against a BRANCH timeline of this project instead of the primary. Takes the timeline_id returned by scalix_db_branch_create (or its db_<timeline_id> form). A timeline that is not a branch of this project fails the call — it never falls back to the primary. Omit for the primary. | |
| confirm_token | No | Confirmation token from a prior CONFIRMATION_REQUIRED response; required to execute destructive SQL (single-use, short TTL) |