run_query
Run a single read-only SELECT query and return the matching rows. Blocks writes, DDL, PRAGMA, comments, and stacked statements to keep database access safe.
Instructions
Run one read-only SELECT and return the rows.
Only a single SELECT is accepted. Anything else - a write, DDL, PRAGMA, ATTACH, a stacked statement, a comment - is rejected before it reaches the database, and the connection used here is opened read-only anyway.
Args: sql: A single SELECT statement.
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 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |