query
Execute SQL SELECT queries to retrieve data from PostgreSQL databases. This read-only tool returns query results with rows, columns, and metadata for database analysis.
Instructions
Execute a SQL query against the PostgreSQL database.
This tool is READ-ONLY by default. Use the 'execute' tool for write operations.
Args:
sql: SQL query to execute (SELECT statements only)
Returns:
Query results with rows, columns, and metadata
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 |