execute_query
Run read-only SELECT queries against Microsoft SQL Server to retrieve data for schema discovery, performance checks, and troubleshooting, with optional server/database targeting and row limits.
Instructions
Execute a read-only SQL query. Only SELECT statements are allowed for safety.
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": {
"query": "<query>"
},
"name": "execute_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The SQL SELECT query to execute | |
| server | No | SQL Server instance (e.g., "server\instance" or "server,port"). Uses default if not specified. | |
| maxRows | No | Maximum rows to return (default: 1000) | |
| database | No | Database to run the query against (optional, uses default if not specified) |