MCP server for SQL Server execution plan analysis and Query Store integration, providing tools for plan examination, performance diagnostics, and index recommendations
PerformanceStudio MCP Server demonstrates solid definition quality with well-structured tool names, comprehensive descriptions, and properly typed input schemas. All 10 tools follow verb_noun naming conventions (list_plans, get_connections, analyze_plan, etc.). Tool descriptions are detailed (130-450 chars, well within the 10-1024 baseline) and include usage context. Input schemas are explicitly defined with proper JSON Schema types and descriptions for all parameters. However, there are notable gaps: (1) Output schemas are NOT documented, tool descriptions explain what fields are returned, but there is no formal schema definition showing LLMs the exact structure of responses; (2) No evidence of error handling guidance (recovery hints, retryability classification, or actionable error messages) in the tool definitions; (3) Tool annotations (readOnlyHint, destructiveHint, idempotentHint) are missing, all tools are READ_ONLY but this is not machine-declared; (4) get_query_store_top has a large parameter count (17 params, with many optional) which adds cognitive load, though they are well-documented with clear filtering semantics.
Returns the full JSON analysis result for a loaded plan. Includes all statements, warnings, missing indexes, parameters, operator tree, memory grants, and wait stats. This is the primary tool for understanding plan quality. Use list_plans first to get session_id values.
Checks whether Query Store is enabled and accessible on a database. Use this before calling get_query_store_top to verify the target database supports Query Store.
Lists saved SQL Server connections. Returns server names and authentication types only — credentials are never exposed. Use connection names with Query Store tools.
Returns the top N most expensive operators from a loaded plan, ranked by cost percentage or actual elapsed time (if available). Useful for quickly finding bottleneck operators.
Returns missing index suggestions from a loaded plan with impact scores and ready-to-run CREATE INDEX statements.
Output schemas are not formally documented. Tool descriptions state what fields are returned (e.g., analyze_plan returns 'statements, warnings, missing indexes, parameters, operator tree, memory grants, wait stats'), but no structured JSON Schema is provided for response validation or agent planning. LLMs cannot predict downstream tool input requirements without knowing the exact response structure.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) declared in tool definitions. All 10 tools are READ_ONLY and idempotent, but this is not machine-declarable. Agents cannot automatically determine which tools are safe to retry without explicit hints.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | B | 74 | 2025-06-18+ | v2 |
Returns parameter details from a loaded plan including names, data types, compiled values, and runtime values. Highlights parameter sniffing when compiled and runtime values differ.
Returns a concise human-readable text summary of a loaded plan: statement count, warnings, missing indexes, cost, DOP, memory grants. Faster than analyze_plan for quick assessment.
Returns only the warnings and analysis findings for a loaded plan. Optionally filter by severity (Critical, Warning, or Info).
Fetches the top N queries from Query Store ranked by the specified metric. Uses the application's built-in Query Store query — no arbitrary SQL is executed. Each fetched plan is automatically loaded into the application for further analysis with analyze_plan, get_plan_warnings, etc. Returns summary stats and session IDs. Optional filters narrow results server-side by query_id, plan_id, query_hash, plan_hash, module name (schema.name, supports % wildcards), query text (query_text_search / query_text_search_not), minimum execution count or average duration/CPU thresholds, execution type, and query-id / plan-id include/ignore lists.
Lists all execution plans currently loaded in the application. Returns session IDs, labels, statement counts, warning counts, and source type. Use this first to discover available plans.
No error handling guidance in tool definitions. Tool descriptions do not explain how to handle failures (e.g., when a session_id does not exist, when Query Store is not enabled, when a connection fails). Agents cannot recover gracefully from errors.
get_query_store_top has 17 parameters, of which 13 are optional filters. While each parameter is well-documented, the sheer count increases cognitive load and may confuse agents about which combinations are valid. Consider grouping related filters (text search filters, threshold filters, ID filters) into a single 'filters' object parameter to reduce surface area.
Parameter defaults are not explicitly stated for optional parameters. get_expensive_operators has a 'top' parameter with 'Default 10', and get_query_store_top has multiple defaults (top=10, order_by=cpu, hours_back=24), but this information is buried in parameter descriptions rather than declared as JSON Schema default fields. Schema defaults improve clarity for schema-aware clients.