Skip to main content
Glama
bpamiri

SQL Server MCP

by bpamiri

describe_table

Retrieve column definitions, primary keys, foreign keys, and indexes for SQL Server tables to analyze database structure and relationships.

Instructions

Get detailed column information for a table.

Retrieves column definitions, primary keys, foreign keys, and indexes.

Args:
    table: Table name, optionally with schema (e.g., 'dbo.Users' or 'Users').
           Defaults to 'dbo' schema if not specified.

Returns:
    Dictionary with:
    - table: Full table name (schema.table)
    - columns: List of column info (name, type, nullable, etc.)
    - primary_key: List of primary key column names
    - foreign_keys: List of foreign key relationships
    - indexes: List of index info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden and does so well by detailing the return structure (dictionary with table, columns, keys, indexes), which clarifies the tool's behavior. It also specifies the default schema ('dbo') for the table parameter, adding useful context. No contradictions are present.

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 front-loaded with the core purpose, followed by details in a structured format (Args and Returns sections). Every sentence adds value: the first states the action, the second elaborates on retrieved info, and the parameter/return explanations are essential for clarity without redundancy.

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

Completeness5/5

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

Given the tool's moderate complexity (single parameter, no annotations, but with an output schema), the description is complete. It explains the parameter semantics thoroughly, details the return structure, and the output schema will handle return values, so no gaps remain for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate fully. It does by explaining the 'table' parameter's semantics: table name with optional schema, defaulting to 'dbo' if not specified, and providing examples ('dbo.Users' or 'Users'). This adds crucial meaning beyond the bare schema.

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?

The description clearly states the specific action ('Get detailed column information') and resource ('for a table'), distinguishing it from siblings like list_tables (which lists table names) or describe_stored_proc (which describes stored procedures). The verb 'retrieves' and the detailed scope (column definitions, keys, indexes) make the purpose unambiguous.

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 implies usage context by specifying what information is retrieved (e.g., column definitions, keys), which helps differentiate it from tools like list_tables (metadata only) or execute_query (general queries). However, it does not explicitly state when not to use it or name alternatives, such as using list_tables for basic table names only.

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/bpamiri/mssql-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server