Skip to main content
Glama
deepeshd87

mcp-sql-querystore

by deepeshd87

sweep_regressions

Detect query regressions across all online databases with Query Store enabled, returning flagged regressions per database. Triage a whole SQL Server instance in one pass.

Instructions

Run regression detection across ALL online databases that have Query Store enabled, and return the worst regressions found per database. Use this to triage a whole instance instead of one database at a time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metricNoMetric to evaluate regression against.cpu_time
recent_hoursNoLength of the recent window, in hours.
top_n_per_dbNoMax regressed queries to return per database.
baseline_hoursNoLength of the baseline window, in hours.
database_namesNoOptional explicit list of databases to sweep. If omitted, sweeps all Query Store-enabled online databases.
min_executionsNoIgnore queries below this execution count.
regression_thresholdNoMinimum fractional worsening to flag.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It does reveal the automatic filtering behavior (only online, Query Store-enabled databases) and the per-database aggregation of results, but says nothing about permission requirements, runtime cost of sweeping an entire instance, or whether the operation is strictly read-only. Adequate but with real gaps for an instance-wide sweep.

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 sentences, no filler, and the scope (ALL Query Store-enabled databases) is front-loaded ahead of the usage hint. Every clause earns its place.

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?

With no output schema and no annotations, the description should shoulder more of the load. It only gestures at the return value ('worst regressions found per database') without describing the fields or shape, and omits any caveats about instance-wide cost or permissions, leaving an agent able to call it but uncertain about results.

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 all seven parameters (metric, windows, thresholds, top_n_per_db, database_names) are already documented in the schema. The description adds no syntax, defaults, or semantics beyond what the schema states, so the baseline 3 applies.

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

Purpose5/5

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

The description gives a specific verb (run regression detection), an explicit scope (ALL online databases with Query Store enabled), and the return shape (worst regressions per database). The phrase 'instead of one database at a time' cleanly separates it from single-database siblings like get_regressed_queries.

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

Usage Guidelines4/5

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

'Use this to triage a whole instance instead of one database at a time' states when to reach for this tool versus the per-database alternative. It stops short of explicit exclusions (e.g., when NOT to sweep, or cost concerns on large instances), so it is clear context without full when/when-not guidance.

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