Skip to main content
Glama

check_statistics_health

Read-onlyIdempotent

Identify stale or outdated statistics with high modification counts and low sample rates, flagging those needing UPDATE STATISTICS.

Instructions

Check statistics health: stale stats, high modification counts, low sample rates. Flags stats needing UPDATE STATISTICS.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stale_daysNoFlag stats not updated in this many days.
database_nameNoOptional database name. Defaults to AZURE_SQL_DEFAULT_DATABASE.
mod_pct_thresholdNoFlag stats where modification_counter exceeds this % of rows.

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 only needs to add behavioral context. It specifies the health criteria (stale, high modification, low sample rates) and the flagging outcome, which is useful but doesn't go beyond what annotations and schema already cover. No contradiction.

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 sentence that packs the purpose, criteria, and outcome efficiently. No redundant words, front-loaded with the action.

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?

The tool is well-covered by annotations (read-only) and an output schema. The description adds the core logic of the health check. It could mention that it doesn't modify anything, but annotations already handle that. It's complete for a diagnostic tool.

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 coverage is 100%, with descriptions for all three parameters. The tool description mentions 'stale stats' and 'high modification counts' which map to stale_days and mod_pct_threshold, but doesn't add extra meaning beyond the schema. The 'low sample rates' check is not parameterized but is a behavioral detail, not a param semantic.

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?

The description clearly identifies the tool's purpose as checking statistics health by examining stale stats, high modification counts, and low sample rates, and it flags stats needing update. This is specific enough to distinguish from generic stats retrieval, though it doesn't explicitly contrast with sibling tools.

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 clear context for when to use this tool (when you need to assess statistics health before updating), but it does not explicitly state alternatives or exclusions. The presence of siblings like get_table_stats and analyze_db_health implies alternatives, but the description doesn't reference them.

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