Skip to main content
Glama
Andrian17

mssql-mcp-server

by Andrian17

mssql_manage_indexes

Get, create, drop, rebuild, and analyze SQL Server indexes to optimize database performance.

Instructions

Manage SQL Server indexes - get, create, drop, rebuild/reorganize, and analyze usage with a single tool. Examples: operation="get" to list indexes, operation="create" with indexName, tableName, columns, operation="analyze_usage" for performance analysis

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoReindex moderebuild
typeNoType of target for reindex (required for reindex operation)
whereNoFilter predicate for a filtered index (for create operation)
methodNoIndex type (for create operation)nonclustered
schemaNoSchema name (defaults to dbo)
targetNoTarget name for reindex (required for reindex operation)
uniqueNoCreate unique index (for create operation)
cascadeNoAccepted for compatibility; SQL Server DROP INDEX has no CASCADE
columnsNoKey column names (required for create, except clustered columnstore)
includeNoINCLUDE columns (for create operation)
ifExistsNoInclude IF EXISTS clause (for drop operation)
indexNameNoIndex name (required for create/drop)
operationYesOperation: get (list indexes), create (new index), drop (remove index), reindex (rebuild/reorganize), analyze_usage (find unused/duplicate)
tableNameNoTable name (optional for get/analyze_usage/drop, required for create)
concurrentNoBuild ONLINE (for create operation; Enterprise/Azure only)
showUnusedNoInclude unused indexes (for analyze_usage operation)
ifNotExistsNoSkip creation when the index exists (for create operation)
includeStatsNoInclude usage statistics (for get operation)
minSizeBytesNoMinimum index size in bytes (for analyze_usage operation)
showDuplicatesNoDetect duplicate indexes (for analyze_usage operation)
connectionStringNoSQL Server connection string (optional; requires --allow-tool-connection-string)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.1/5.0
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 disclosing behavior. It only lists operation names and gives a few examples; it does not warn about destructive drop behavior, rebuild/reorganize locking or availability impact, permission requirements, or the connectionString restriction that requires --allow-tool-connection-string.

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?

The description is compact: two sentences covering scope and representative examples. It front-loads the tool's purpose and avoids filler. A bulleted list or operation table might be more scannable, but the current structure wastes little space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite rich schema coverage, this is a 21-parameter, five-operation tool with no annotations and no output schema. The description covers examples for only three operations and omits drop and reindex guidance, operation-specific parameter combinations, destructive-operation cautions, and any indication of what the tool returns. That is a significant gap for an agent selecting among many sibling tools.

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 the baseline is 3. The description's examples add marginal clarity by pairing operation='create' with indexName, tableName, and columns, but this largely repeats what the schema already documents as required-for-create. It does not add meaningful new meaning for most of the 21 parameters.

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 resource (SQL Server indexes) and enumerates the specific operations: get, create, drop, rebuild/reorganize, and analyze usage. It establishes an index-focused scope that distinguishes it from sibling tools like mssql_manage_schema or mssql_execute_query, though it leans on the broad verb 'manage' rather than a single precise action.

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 examples imply usage: operation='get' for listing indexes, operation='create' for creating, and operation='analyze_usage' for performance analysis. However, there is no explicit statement about when to prefer this tool over alternatives, no when-not guidance, and no mention of related tools such as mssql_execute_query or mssql_analyze_database.

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