query
Run read-only SQL SELECT statements to retrieve database data in a compact column/row format. Supports pagination with skip/take and returns total matching rows.
Instructions
Execute a read-only SELECT SQL query. Returns results in a compact column/row format to reduce token usage. Results are capped at 100 rows; use skip/take for pagination. The meta.totalCount field shows the total number of matching 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 | SELECT SQL statement to execute | |
| skip | No | Number of rows to skip (offset) | |
| take | No | Maximum rows to return (max 100) | |
| database | No | Database to query; omit to use the default database |