Skip to main content
Glama
bpamiri

SQL Server MCP

by bpamiri

describe_table

Retrieve detailed column definitions, primary keys, foreign keys, and indexes for SQL Server tables to understand 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 of behavioral disclosure. It effectively describes the tool's behavior by detailing the return structure (dictionary with table, columns, primary_key, foreign_keys, indexes) and clarifies the table parameter's optional schema handling and default. However, it doesn't mention potential errors (e.g., if the table doesn't exist) or performance considerations.

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 well-structured and front-loaded, starting with a clear purpose statement, followed by specific details, and ending with return value documentation. Every sentence adds value: the first states the action, the second elaborates on retrieved information, and the Args/Returns sections provide essential usage and output details 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 covers the purpose, parameter semantics, and return structure in detail. The presence of an output schema means the description doesn't need to explain return values exhaustively, and it adequately addresses the gaps from missing annotations and low schema coverage.

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 input schema has 0% description coverage (no schema descriptions), so the description must fully compensate. It adds significant meaning beyond the bare schema by explaining the table parameter's format (optionally with schema like 'dbo.Users'), default behavior (defaults to 'dbo' schema if not specified), and providing an example. This fully documents the single parameter's semantics.

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 focuses on procedures). It precisely identifies what information is retrieved: column definitions, primary keys, foreign keys, and indexes.

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 description implies usage by specifying what information is retrieved, but does not explicitly state when to use this tool versus alternatives. For example, it doesn't contrast with list_tables (which provides only table names) or read_rows (which fetches data rows), leaving the agent to infer context from the tool's purpose.

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/pymssql-mcp'

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