Skip to main content
Glama
shadow-dba

mssql-dba-mcp

by shadow-dba

Get Index Health

mssql_db_index_health
Read-onlyIdempotent

Assess index health across one SQL Server database: review key and included columns, usage, fragmentation, size, fill factor advice, and suggested DROP, REBUILD, or REORGANIZE scripts.

Instructions

Index health for one database: every non-PK index with key and included columns, usage (never used, write-only), fragmentation, fill factor advice, size and a suggested DROP, REBUILD or REORGANIZE script to review. Reads index physical stats (LIMITED), which can be slow on very large databases; use mssql_table_index_health for a few tables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseNameNoTarget database. Defaults to connected database.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety bar is met. The description adds real value beyond that: it discloses the LIMITED scan-mode performance caveat on large databases and clarifies that DROP/REBUILD/REORGANIZE output is a script 'to review' rather than executed work.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, densely but purposefully packed; the returned-content enumeration and the performance caveat are both front-loaded. Slight density cost, but no filler sentence.

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 no output schema, the description carries the return-value burden and does so by listing the fields returned. Combined with the performance caveat and sibling routing, it is nearly complete; only pagination/result-size behavior is unstated.

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% and the single parameter (databaseName) is fully documented including its default. The description adds no syntax or format detail beyond what the schema provides, so 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?

States a specific verb+resource ('index health for one database') and enumerates the returned content: key/included columns, usage, fragmentation, fill factor advice, size, and suggested scripts. It also names the sibling it is not (mssql_table_index_health), so an agent can distinguish it without opening a schema.

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

Usage Guidelines5/5

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

Explicitly routes the agent: use mssql_table_index_health when only a few tables are of interest, and this tool otherwise. It also warns that physical stats (LIMITED) can be slow on very large databases, which is actionable timing guidance.

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