Skip to main content
Glama

describe_table

Read-only

Inspect a table or view's columns, indexes, foreign keys, engine, and row estimate to plan accurate queries before writing them.

Instructions

Returns one table's or view's columns (type, nullability, default, collation), indexes (key parts in order, uniqueness, cardinality), foreign keys, engine and approximate row count. Use it before writing a query against the table.

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

Input Schema

NameRequiredDescriptionDefault
tableYesTable or view name, exact case.
databaseYesDatabase (schema) name, exact case.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so safety is covered. The description adds meaningful behavioral detail beyond them — notably that the row count is approximate and that key parts are returned in order, which tells the agent not to treat counts as exact. It doesn't mention cost, latency, or behavior for missing/nonexistent tables.

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 sentences, zero filler. The return payload is front-loaded as a single dense list, and the operational guidance follows immediately, so an agent can skim either half independently.

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?

With an output schema present, the description needn't formalize return structure, and it still previews the categories returned. Combined with 100% parameter documentation and read-only annotations, nothing an agent needs in order to call this correctly is missing.

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 coverage is 100%, and both parameters already document the important nuance (exact case, max length, table-or-view acceptance). The description adds nothing further about the two inputs, so this is the baseline 3 where the schema does the heavy lifting.

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?

States a specific verb and resource ("Returns one table's or view's columns") and then enumerates exactly what the response contains: column type, nullability, default, collation, ordered key parts, uniqueness, cardinality, foreign keys, engine and approximate row count. This makes it trivially distinguishable from list_tables, list_databases, and run_query without opening a schema.

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?

Gives an explicit usage condition: "Use it before writing a query against the table," which routes the agent ahead of run_query. It does not state when not to use it or name an alternative for discovery-type needs (e.g., listing tables), so it stops short of full when/when-not guidance.

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