Skip to main content
Glama
MCP Database Server

MCP Database Server

by RifkyR3

db_describe_table

Retrieve a table's schema details—columns, data types, nullability, and primary key constraints—to inspect structure before writing queries or migrations.

Instructions

Get schema structure of a table (columns, data types, nullability, primary key constraints).

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": {
      "tableName": "<tableName>"
    },
    "name": "db_describe_table"
  }
}

Input Schema

NameRequiredDescriptionDefault
mainIdNoMain connection ID
schemaNoOptional schema name
databaseNoTarget database name
tableNameYesName of the table to describe
connectionIdNoSub-connection ID / alias (e.g. "app_db") or composite ("mainId:db")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. "Get" implies a read-only operation and the parenthetical discloses the shape of the returned metadata, which is genuinely useful, but access requirements, behavior on missing tables, and whether metadata is live or cached are all unstated.

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?

A single front-loaded sentence with no filler; the parenthetical enumeration is efficient and scannable. It is tight, though arguably so brief that it leaves gaps covered under other dimensions.

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?

With no output schema, the description helpfully enumerates the returned metadata, which partly compensates. However, for a tool with five parameters spanning mainId, connectionId, database, and schema, it gives no guidance on how these resolve together, leaving a real gap for multi-connection callers.

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%, with each of the five parameters documented in the schema, including the connectionId composite format. The description adds no meaning beyond that, so the baseline of 3 applies.

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?

States a specific verb and resource ("Get schema structure of a table") and even enumerates what the structure comprises: columns, data types, nullability, primary key constraints. That clearly separates it from db_execute_query and db_list_tables, though it never names the siblings to reinforce the distinction.

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 explicit when-to-use guidance: nothing says to call it before writing a query, nor that db_list_tables should be used first to find the table name, nor any precondition such as needing a registered connection. Usage is only inferable from the purpose statement itself.

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