Skip to main content
Glama

Describe table

describe_table
Read-onlyIdempotent

Inspect a PostgreSQL table or view to retrieve columns, constraints, indexes, size, and estimated rows, helping you understand schema structure and plan queries.

Instructions

Columns (type, nullability, default), constraints, indexes (with scan counts), size, and estimated rows.

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

Input Schema

NameRequiredDescriptionDefault
tableYesTable or view name
schemaYesSchema name, e.g. public

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.8/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=true, so the safety profile is covered. The description's contribution is disclosing return content, notably that indexes come with scan counts and that size and estimated row counts are included — useful since there is no output schema. It says nothing about behavior on a missing schema/table or about the cost of the scan-count lookup.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is short and wastes no words, but it is a sentence fragment with no lead-in verb, which makes it read like an output-field summary rather than a tool description. A single clause such as 'Returns metadata for one table:' would have made it clear at no length cost.

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 must carry return-value information, and it does name the returned categories. However, for a two-parameter introspection tool it omits error behavior for unknown tables, any output format hints, and how it relates to the catalog-listing siblings.

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 both 'schema' and 'table' documented including length limits and an example ('public'), so the baseline of 3 applies. The description adds no meaning about identification, case sensitivity, or what happens when the table lives in a non-default schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The text is a noun-phrase list of returned fields rather than a statement of what the tool does; the verb 'describe' is inferred from the name/title alone. It does tell the agent what information is available (columns, constraints, indexes, size, row estimates), which is more than a pure tautology, but it never declares the operation explicitly or distinguishes itself from list_tables or select_rows.

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 when-to-use guidance, no prerequisites, and no mention of alternatives such as list_tables for discovery or select_rows for data. The agent must infer from the sibling names that this is the metadata-inspection tool.

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