query
Execute parameterized SQL statements on a PostgreSQL database, returning rows and row counts.
Instructions
Execute a SQL query against the PostgreSQL database. Supports parameterized queries for safety. Returns rows and row count.
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 | SQL query to execute | |
| params | No | Optional array of parameters for parameterized queries (e.g. $1, $2) |