Skip to main content
Glama

Describe table

describe_table

Inspect a PostgreSQL table to get its columns, data types, primary key, and existing indexes. Use it to understand table structure before writing or optimizing queries.

Instructions

Describe one table: columns and types, primary key, and existing indexes.

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
tableYesTable name, e.g. "orders".
schemaNoSchema name. Defaults to "public".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. "Describe" implies a read-only operation, and the description discloses the shape of the returned metadata (columns/types, primary key, indexes). It does not state what happens for a missing table or whether any permissions are required, leaving real behavioral gaps for an unannotated tool.

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?

One sentence, front-loaded with the action and the returned fields, with zero filler. Nothing could be removed without losing information.

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?

For a simple two-parameter read-only metadata tool with no output schema, the description covers what is returned well enough to call correctly. It is less complete on error behavior and on how this differs from table_stats or list_tables.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and both parameters are documented in the schema, including the default schema of "public". The description adds little beyond that, but with a fully documented schema the baseline is adequate.

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 gives a specific verb ("Describe") and resource ("one table") and enumerates what is returned: columns and types, primary key, indexes. That is enough to distinguish it from a list or stats tool. It does not explicitly name a sibling (list_tables, table_stats) to sharpen the boundary, so it falls short of a 5.

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 phrase "one table" implies this is for a single-table inspection rather than an enumeration, which implicitly separates it from list_tables. However, there is no explicit when-to-use or when-not-to-use guidance, and no mention of table_stats or describe-style alternatives for comparing table size or query plans.

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