query
Run parameterized SELECT statements with optional parameters to retrieve rows from a PostgreSQL database. Prevents SQL injection through read-only, audit-logged access.
Instructions
Execute a parameterized SELECT query and return rows.
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": "query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | Parameterized SELECT SQL query (use $1, $2, etc. for parameters) | |
| params | No | Optional list of query parameters |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||