Skip to main content
Glama
deepeshd87

mcp-sql-querystore

by deepeshd87

get_wait_stats

Aggregate query wait time by wait category to identify why SQL Server queries are slow (CPU, blocking, IO, memory), ranked by total wait time.

Instructions

Aggregate query wait time by wait category over a time window — shows WHY queries are slow (CPU, blocking/locks, IO, memory, etc.) rather than which are slow. Ranked by total wait time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_nNoMax wait categories to return.
recent_hoursNoLookback window in hours.
database_nameYesTarget SQL Server database name.

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 is transparent about what it aggregates, the time window, and the ranking order, but never states that it is a read-only operation, what permissions are required, or what the returned units/columns look like, with no output schema to fall back on.

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 with an em-dash clarification; the core action comes first and the diagnostic value proposition follows. No filler sentences.

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?

For a no-output-schema diagnostic read tool, the description conveys what is returned (wait time aggregated by category, ranked by total wait time), which is enough to call it correctly. Minor gaps remain around result units and whether wait times are per-category totals or averages.

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%: all three parameters (top_n, recent_hours, database_name) are documented inline with defaults. The description reinforces the idea of a time window and category grouping but adds no syntax, units, or bounds 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 and resource ('Aggregate query wait time by wait category over a time window') and adds a genuine differentiator: it exposes WHY queries are slow rather than WHICH are slow, which separates it in kind from query-level siblings. It does not name a specific sibling, so it falls short of a 5.

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 by the 'WHY vs which' framing — an agent can infer this is a diagnostic tool for root-causing slowness rather than finding slow queries. However, no explicit when-to-use condition, prerequisite, or named alternative (e.g. get_regressed_queries, get_query_execution_plan) is given.

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