Skip to main content
Glama
deepeshd87

mcp-sql-querystore

by deepeshd87

get_regressed_queries

Detect SQL queries whose performance regressed by comparing recent Query Store metrics to an earlier baseline and flagging threshold breaches.

Instructions

Detect queries whose performance regressed by comparing a recent period against an earlier baseline period from Query Store.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_nNoMax rows to return.
metricNoMetric to evaluate regression against.cpu_time
recent_hoursNoLength of the recent window, in hours.
database_nameYesTarget SQL Server database name.
baseline_hoursNoLength of the baseline window preceding the recent window, in hours (default 7 days).
min_executionsNoIgnore queries with fewer executions than this in either period (filters noise).
regression_thresholdNoMinimum fractional worsening to flag (0.5 = 50% worse than baseline).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/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, and it does disclose the core behavior: a comparison of a recent window against a preceding baseline. It omits whether the operation is read-only, the cost of querying Query Store, permission requirements, and whether results include the regressed query text or plan.

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?

A single front-loaded sentence that names the action, the subject, and the comparison mechanism with zero filler. Nothing is padded or repeated from the schema.

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

Completeness3/5

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

For a 7-parameter analytical tool with no annotations and no output schema, the description covers the 'what' but leaves the return shape, ordering, and the boundary against sweep_regressions unstated. Adequate but with clear gaps an agent would have to guess around.

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 every parameter (top_n, metric, recent_hours, baseline_hours, min_executions, regression_threshold) is already documented in the schema with defaults and semantics. The description adds the conceptual framing of 'recent vs. baseline' but no syntax or edge-case detail beyond the schema.

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+resource ('Detect queries whose performance regressed') and the mechanism (recent period vs. earlier baseline from Query Store), so the agent knows exactly what it returns. It does not, however, distinguish itself from the sibling sweep_regressions, which by name appears to overlap heavily with this capability.

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

Usage Guidelines2/5

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

There is no guidance on when to choose this over sweep_regressions, get_query_execution_plan, or get_wait_stats, nor any prerequisite (e.g. Query Store must be enabled). Usage must be inferred entirely from the one-sentence purpose.

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