Skip to main content
Glama
Automata MCP

Automata MCP

Describe a database table

describe-table
Read-onlyIdempotent

Inspect a PostgreSQL table’s columns, types, defaults, constraints, indexes, comments, foreign keys, and view SQL before writing queries.

Instructions

[PostgreSQL] Show one table's columns — name, type, nullability, default, identity, and enumValues where the type is an enum — plus its primary key, unique and CHECK constraints, indexes, comments, and BOTH directions of its foreign keys: foreignKeys is where this table points, referencedBy is what points at it. Those two are the join graph — read them before inventing a join condition. enumValues and the CHECK constraints are a column's permitted values: a filter on a value outside them returns no rows and reads like an empty result rather than a mistake. For a view, viewDefinition is the SQL it is defined as, which names its base tables and join keys. Use the exact schema and name that list-tables returned; identifiers are case-sensitive. Read this before writing SQL against a table you have not already described in this conversation: guessing a column name costs a round trip, and guessing a type produces a query that runs and quietly returns the wrong thing. A foreign key whose reachable is false points at a table this token cannot describe or query, and referencedByOutOfScope counts inbound keys from tables it cannot name — in both cases tell the user, since only the account owner can widen the allowlist. If the table itself is not reachable the answer is a refusal, not an empty description — call list-tables to see what is reachable.

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

Input Schema

NameRequiredDescriptionDefault
nameYesTable name exactly as list-tables reported it, including capitalisation
schemaNoSchema exactly as list-tables reported itpublic

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Well beyond the readOnly/idempotent annotations, it discloses non-obvious result semantics: `reachable: false` means the token cannot describe or query that target, `referencedByOutOfScope` counts inbound keys from unnamed tables, and in both cases the user must be told because only the account owner can widen the allowlist. It further discloses that an unreachable table yields a refusal rather than an empty description, which prevents a serious misreading of results.

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?

It is front-loaded with the one-line purpose before the field inventory, and nearly every sentence carries distinct operational value. It is on the long side and includes some rhetorical framing ('reads like an empty result rather than a mistake'), but nothing is redundant enough to cut cleanly.

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 no output schema, the description carries the return-value burden and does so by naming the key fields and their meaning (`foreignKeys` vs `referencedBy`, `viewDefinition`, `enumValues`). It also covers the refusal and out-of-scope edge cases, leaving nothing an agent needs in order to call it and interpret the answer correctly.

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%, so the baseline is 3, but the description adds operational meaning: identifiers are case-sensitive and both `schema` and `name` must be the exact values list-tables reported. That provenance requirement is a real constraint the schema only hints at with 'including capitalisation.'

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?

The opening sentence names a specific verb ('Show') and resource ('one table's columns') and enumerates exactly what is returned: column name, type, nullability, default, identity, enumValues, primary key, unique/CHECK constraints, indexes, comments, and both directions of foreign keys. It also distinguishes itself from list-tables by naming that sibling explicitly, so an agent can tell the two apart without opening any schema.

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

Usage Guidelines5/5

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

It states the trigger condition plainly: 'Read this before writing SQL against a table you have not already described in this conversation,' and explains the cost of skipping it (guessed column costs a round trip; guessed type returns quietly wrong results). It also routes to a named alternative when inapplicable: if the table is not reachable, 'call list-tables to see what is reachable.'

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