sql_run_query
Execute SELECT queries against a configured SQL Server database and retrieve formatted results, with automatic row limiting to keep output manageable for data inspection and debugging.
Instructions
Execute a SELECT query against the configured SQL Server database and return formatted results. Only SELECT statements are allowed here — for writes, use sql_run_write.
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": "sql_run_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The SELECT SQL query to execute | |
| maxRows | No | Max rows to display (default: 500). Query will auto-add TOP N if not present. |