Skip to main content
Glama
deepeshd87

mcp-sql-querystore

by deepeshd87

get_missing_index_impact

Aggregate missing-index recommendations from SQL Server Query Store plans, rank them by optimizer-estimated impact, and group duplicates across queries.

Instructions

Aggregate missing-index recommendations found in Query Store plans, ranked by the optimizer's estimated impact score. Groups duplicate recommendations across queries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_nNoMax index recommendations to return.
database_nameYesTarget SQL Server database name.
plan_scan_limitNoHow many recent plans (that contain missing indexes) to scan and aggregate. Higher = more thorough, slower.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does disclose non-obvious behavior: it scans Query Store plans, ranks by the optimizer's estimate, and deduplicates recommendations across queries. However, it omits read-only confirmation, the cost/latency implication of plan_scan_limit (only hinted in the schema), and any note about what the impact score does or does not account for.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences, front-loaded with what is aggregated and how it is ranked, then the deduplication behavior. No filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description must convey the return shape, and it does so reasonably (aggregated, ranked recommendations). The main remaining gap is the absence of any cost or scope caveat for a tool that scans hundreds of plans by default.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so top_n, database_name, and plan_scan_limit are already fully documented, including the plan_scan_limit thoroughness/speed tradeoff. The description adds no parameter-level detail beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (aggregate) and resource (missing-index recommendations from Query Store plans), plus the ordering criterion (optimizer's estimated impact score). The resource is unique enough among the siblings (regressed queries, execution plans, wait stats) that an agent can tell it apart, though it never names a sibling explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied — an agent would call this to decide which missing indexes to add — but there is no explicit statement of when to prefer it over get_query_execution_plan or the other siblings, and no exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.