Skip to main content
Glama
Debanjan29

mcp-sqlserver

by Debanjan29

get_query_store_stats

Retrieve top resource-consuming queries from SQL Server Query Store (must be enabled) sorted by CPU, duration, reads, writes, or executions for performance tuning.

Instructions

Get top resource-consuming queries from Query Store (SQL Server 2016+). Query Store must be enabled on the database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoNumber of top queries (default: 10)
serverNoTarget server name (uses default if omitted)
sort_byNoSort metric (default: cpu)
databaseNoDatabase name (uses connection default if omitted)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only mentions the prerequisite but does not state that this is a read-only operation, what the return payload looks like, whether it could be resource-intensive, or any permission requirements. This lack of behavioral context is a significant gap.

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?

The description is brief and efficient: one sentence stating the tool's purpose and a second sentence for the prerequisite. It is front-loaded with the action and resource. No wasted words or redundant information. It meets the conciseness ideal.

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?

Given the tool's moderate complexity (4 params, no output schema), the description is minimally sufficient but lacks details about the return format or any hints about the nature of 'top resource-consuming queries'. It does not explain what metrics are included or how results are presented. While the schema covers parameter semantics, the description leaves the result structure undefined, which could cause agent uncertainty.

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 four parameters (top, server, sort_by, database) are already documented in the schema. The description does not add any extra meaning or usage details beyond the schema, which is acceptable per the baseline rule. It does not compensate for any gaps because there are none.

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 clearly states the verb 'get', the resource 'top resource-consuming queries from Query Store', and the product version (SQL Server 2016+). This distinguishes it from siblings like get_query_plan (single query plan) and get_active_queries (current running queries). The purpose is unambiguous.

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?

The description provides a clear prerequisite ('Query Store must be enabled') which gives context on when the tool is applicable. However, it does not explicitly mention alternatives or when not to use this tool, though the sibling list includes other query-related tools that might be competitive. The prerequisite is useful but not a full usage guide.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Debanjan29/readonly-mssql-mcp-db'

If you have feedback or need assistance with the MCP directory API, please join our Discord server