run_sql
Executes guarded read-only PostgreSQL SELECT queries for analytics questions metrics can’t answer, returning result columns, rows, and the executed SQL.
Instructions
Run one read-only PostgreSQL SELECT (WITH, UNION, INTERSECT and EXCEPT allowed) over the tables in schema saas, for questions no metric answers. Writes, DDL, system catalogs and uncommon functions are rejected; rows are capped by an added LIMIT and the query is cancelled if it runs too long. Returns columns, rows and the SQL that was executed.
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_sql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||