mssql_top_queries
Identify the most resource-intensive queries from the SQL Server plan cache. Rank by CPU, duration, reads, writes, memory, or executions to start performance tuning.
Instructions
Find the most expensive queries from the plan cache, ranked by a chosen metric: cpu, duration, reads (logical I/O), writes, memory (grant size), or executions. Returns per-query totals and averages with the SQL text — the starting point for performance tuning.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "mssql_top_queries"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | Number of queries to return (default: 10, max: 50) | |
| metric | No | Ranking metric (default: cpu) | cpu |
| response_format | No | Response format (default: markdown) | markdown |