Skip to main content
Glama
shadow-dba

mssql-dba-mcp

by shadow-dba

Get DB Identity Headroom

mssql_db_identity_headroom
Read-onlyIdempotent

Check SQL Server identity column headroom to find columns nearing their type range limit. Warns at 50% used and flags risk at 80%, helping prevent failed inserts.

Instructions

Identity headroom: identity columns with the % of their type range already used (tinyint to bigint, decimal), most used first. WARN at 50%, RISK at 80%: when an identity runs out, every insert fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNNoMaximum number of columns to return. Defaults to 50.
databaseNameNoTarget database. Defaults to connected database.
minPercentUsedNoOnly return columns that used at least this percent of their range. Defaults to 0 (all).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/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 bar is lower, and the description adds real value beyond them: the 50%/80% warning thresholds, the consequence of exhaustion (all inserts fail), and the sort order of results. It does not mention permissions or scope of the scan, but the risk semantics are well disclosed.

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?

Two dense sentences with zero filler: the metric and ordering come first, then the alert thresholds and the failure consequence. Every clause earns its place.

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 and zero required parameters, the description adequately conveys what is returned (identity columns plus percent of range used, ordered) and the severity interpretation. Only minor gaps remain, such as the exact fields or database scope behavior, which the schema partially covers.

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 topN, databaseName, and minPercentUsed are already fully documented in the schema; the description adds no parameter-level detail such as how minPercentUsed interacts with the WARN/RISK levels. Baseline 3 is appropriate when the schema does the heavy lifting.

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 names the exact resource and metric: identity columns with the percentage of their type range already consumed (tinyint to bigint, decimal), returned most-used-first. No sibling tool covers identity headroom, so it is trivially distinguishable, though it is framed as a noun phrase rather than an explicit verb+resource statement.

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 rather than stated: the WARN/RISK thresholds and the note that 'when an identity runs out, every insert fails' tell the agent why to call it, but there is no explicit when-to-use guidance, prerequisites, or named alternative among the many mssql_* diagnostics.

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