Skip to main content
Glama
hangdo-merkle

postgres-mcp

describe_table

Inspect a PostgreSQL table's structure, including columns, data types, nullability, defaults, and constraints. Use it to understand table schema without writing queries.

Instructions

Show columns, data types, nullability, defaults, and constraints for a table.

Args: table: Table name. schema: Schema that owns the table (default: "public").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
schemaNopublic

Output Schema

TableJSON 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?

With no annotations provided, the description carries the full load and it does disclose the core behavior: a read-only, non-mutating introspection operation that returns table metadata. It does not mention edge cases like missing tables or permission requirements, but the behavior is plainly conveyed.

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?

The description is one focused sentence followed by a tight, useful Args block. Every sentence earns its place, with no redundancy or filler.

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?

For a simple introspection tool with two parameters and an output schema, the description provides everything needed to call it correctly: required table name, optional schema with a default, and the exact information returned. No important gap remains.

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 description coverage is 0%, but the description compensates by explaining each parameter: 'Table name' for table and 'Schema that owns the table' with the 'public' default. This adds meaning beyond the bare type/name fields in the input schema, though it stays minimal.

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 description names a specific verb ('Show') and resource ('a table'), and enumerates the exact metadata returned: columns, data types, nullability, defaults, and constraints. This clearly distinguishes it from siblings like list_tables or get_table_sample.

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?

Usage context is implied rather than explicit: an agent can infer that this tool is for inspecting a table's schema, but the description does not state when to prefer it over alternatives or mention exclusions. It provides no explicit 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.