Skip to main content
Glama

detect_parameter_sniffing

Read-onlyIdempotent

Identify parameter sniffing by comparing query plan durations; flags queries where the worst-to-best ratio exceeds a threshold (default 10x).

Instructions

Detect parameter sniffing: queries with multiple plans where MAX(avg_duration) / MIN(avg_duration) exceeds threshold (default 10x).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_nNoMax number of results.
database_nameNoOptional database name. Defaults to AZURE_SQL_DEFAULT_DATABASE.
window_minutesNoQuery Store lookback window in minutes (default 24 hours).
variance_thresholdNoMin ratio of worst/best plan duration to flag (e.g., 10 = 10x worse).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

Annotations already declare the tool as read-only, idempotent, and non-destructive, so the description's lack of such details is acceptable. The description adds the detection algorithm (ratio threshold) but does not disclose dependencies (e.g., Query Store availability) or return format. This is adequate but not especially rich beyond the annotation baseline.

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 a single, focused sentence that front-loads the core concept and detection logic. It avoids filler and is highly efficient for an agent scanning tool descriptions.

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 a clear algorithm, full schema coverage, and strong annotations, the description is nearly complete for a read-only diagnostic tool. It could note prerequisites like 'requires Query Store' but otherwise the agent has enough context to select and invoke the tool correctly.

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?

All four parameters are described in the schema (100% coverage), so the description adds little beyond what is already available. The mention of 'default 10x' mirrors the schema's 'variance_threshold' description, providing no new semantic insight. Baseline 3 is appropriate.

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 tool's purpose: to detect parameter sniffing by identifying queries with multiple plans where the ratio of MAX to MIN average duration exceeds a threshold. This specific metric distinguishes it from sibling tools like 'detect_regressed_queries' or 'get_query_parameter_buckets', which focus on different aspects.

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?

The description implies use when parameter sniffing is suspected, but it does not explicitly state when to prefer this tool over alternatives, nor does it mention any exclusions or prerequisites. The usage context is only weakly implied by the tool's name and description.

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/akaalholdings/azure-sql-mcp'

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