Skip to main content
Glama
MSSQL MCP Server

MSSQL MCP Server

by Elad-Health

get_index_usage

Retrieve index usage statistics to identify unused or missing indexes, helping optimize SQL Server database performance.

Instructions

Get index usage statistics to identify unused or missing indexes

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "database": "<database>"
    },
    "name": "get_index_usage"
  }
}

Input Schema

NameRequiredDescriptionDefault
serverNoSQL Server instance (e.g., "server\instance" or "server,port"). Uses default if not specified.
databaseYesDatabase name to analyze
showUnusedNoInclude unused indexes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. 'Get' implies read-only, but nothing is said about whether the operation is expensive (index usage DMV queries can be costly on busy instances), whether statistics reset on server restart or index rebuild, or that 'missing index' suggestions come from a different source and are advisory only. These are material caveats for an agent interpreting the results.

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?

A single tight sentence with the goal front-loaded and no wasted wording. Slightly more could be said to earn a 5, but nothing present is padding.

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?

For a three-parameter read tool with full schema coverage and no output schema, the definition is minimally sufficient. It is incomplete on the interpretive side: an agent is told to find unused and missing indexes but not what the returned statistics represent, how they are scoped, or how to read them.

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% across all three parameters, so the schema already explains server, database, and showUnused including its default. The description adds no meaning beyond that — it only echoes the 'unused' concept covered by showUnused, 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?

A specific verb-plus-resource (index usage statistics) with the analytical goal stated: identifying unused or missing indexes. That goal implicitly distinguishes it from the sibling get_indexes, which would return index definitions, but the description never names that sibling or any other, so the differentiation is left to inference.

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 stated outcome ('identify unused or missing indexes'), which tells an agent roughly when this tool is relevant. There is no explicit when-not guidance, no mention of the alternative get_indexes, and no note about prerequisites such as the target database needing to be online and accumulating workload history.

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