run_query
Execute a single read-only PostgreSQL SELECT query returning up to 100 rows, with writes and risky functions rejected for safety. Read error messages to fix and retry failed SQL.
Instructions
Run ONE read-only PostgreSQL SELECT query. Returns up to 100 rows.
Writes, multiple statements and risky functions are rejected with a reason. If a query fails, read the error message, fix the SQL, and try again.
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 |
|---|---|---|---|
No arguments | |||