Skip to main content
Glama
sql-mcp
by ohankay

describe_table

Read-onlyIdempotent

Retrieves column definitions, primary keys, indexes, foreign keys, and row counts for a SQL Server table or view so you can inspect its schema without manual queries.

Instructions

Columns (type, nullability, identity, default, computed), primary key, indexes, foreign keys and row count of a table or view. table: 'dbo.Customers' or 'Customers'.

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": {
      "table": "<table>"
    },
    "name": "describe_table"
  }
}

Input Schema

NameRequiredDescriptionDefault
tableYes
databaseNo
connectionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered without the description. The description's added value is enumerating exactly what metadata comes back, which matters because there is no output schema, but it says nothing about behavior with respect to the connection/database scope or missing objects.

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?

Two compact fragments, with the returned metadata front-loaded ahead of the argument format note. The telegraphic parenthetical list is dense but readable, and no sentence is wasted.

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?

Absent an output schema, describing the returned fields is the right core content, and that is done. Completeness suffers because the scoping parameters (which database, which connection) go unaddressed in a tool set that includes list_connections and list_databases, so an agent cannot tell how connection selection affects the result.

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 0%, so the description has to carry real weight; it does explain the required `table` argument with concrete format examples ('dbo.Customers' or 'Customers'), which the schema lacks. However, the `database` and `connection` parameters are not mentioned at all, leaving a meaningful gap in a multi-connection server.

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 operation's subject precisely — columns (with type, nullability, identity, default, computed), primary key, indexes, foreign keys and row count for a table or view. An agent immediately knows this is schema introspection rather than data retrieval. It does not, however, contrast itself with nearby tools such as get_object_definition or list_objects, so sibling differentiation is left implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to call this instead of get_object_definition, list_objects, or execute_sql, and no prerequisites or exclusions. Usage is only inferable from the fact that a table name is required and metadata is returned.

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