Run query
run_queryExecute a single read-only SQL statement in a guarded transaction, with capped results marked truncated when additional rows exist. Use it to safely inspect PostgreSQL data without writes or DDL.
Instructions
Run a single read-only SQL statement inside a read-only transaction. Results are capped and marked as truncated when more rows exist.
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 | ||
| max_rows | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||