run_query
Run a read-only SELECT query on allowlisted tables, validated by PostgreSQL grammar and access policies, with statement timeout and row cap. Denials name the rule that triggered them.
Instructions
Run one read-only SELECT against the allowlisted tables. The statement is parsed with the real PostgreSQL grammar and checked against the access policy, then executed inside a read-only transaction with a statement timeout and a row cap. Denials name the rule that triggered them.
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 SELECT statement. Joins, aggregates, window functions, and read-only CTEs are fine. Anything else — DML, DDL, multiple statements, SELECT INTO, FOR UPDATE, denied functions, tables or columns outside the access policy — is rejected with the rule that triggered it. |