get_wait_stats
Aggregate query wait time by wait category to identify why SQL Server queries are slow (CPU, blocking, IO, memory), ranked by total wait time.
Instructions
Aggregate query wait time by wait category over a time window — shows WHY queries are slow (CPU, blocking/locks, IO, memory, etc.) rather than which are slow. Ranked by total wait time.
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": {
"database_name": "<database_name>"
},
"name": "get_wait_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | Max wait categories to return. | |
| recent_hours | No | Lookback window in hours. | |
| database_name | Yes | Target SQL Server database name. |