run_query
Execute one read-only SQL SELECT to retrieve data from the workbench database, returning column names, rows, and whether results were capped.
Instructions
Run one read-only SELECT against the workbench database.
Enforced by SQLite itself, not by string matching: the connection is
opened read-only and an authorizer rejects every non-read action, so
writes, DDL, PRAGMA and ATTACH all fail. Only one statement per call.
Returns the column names, the rows, and whether the result was capped.
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": "run_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | A single read-only SQL SELECT statement (SQLite dialect). | |
| max_rows | No | Row cap for this call. Defaults to the server limit. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||