Skip to main content
Glama
Postgres MCP Server

Postgres MCP Server

by Zotriq

describe_table

Inspect a PostgreSQL table's columns, data types, primary key, and foreign keys to understand its schema before writing read-only queries.

Instructions

Show columns, types, primary key and foreign keys for a table (e.g. 'public.orders').

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
tableYes
databaseNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden, and it does convey the read-only introspection nature plus exactly what is returned. It does not disclose behavior for missing/ambiguous tables, permission requirements, or how the optional database argument changes resolution, leaving meaningful 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.

Conciseness4/5

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

One compact sentence with the resource list front-loaded and a genuinely useful example in parentheses. Nothing is redundant, though there is no structural separation between what is returned and how to call it.

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?

An output schema exists, so return-value detail need not be in the description, and the example covers the required argument's format. However, for a tool with an undocumented second parameter and no annotations, an agent still lacks guidance on default database resolution and failure behavior.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. The example 'public.orders' usefully shows the expected qualified naming for the 'table' argument, but the 'database' parameter is left completely unexplained in both schema and description.

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?

Names a specific verb ('Show') and a concrete resource set ('columns, types, primary key and foreign keys') scoped to one table, which clearly distinguishes it from siblings like list_tables or run_query. It stops short of explicitly contrasting itself with those siblings, so it is clear but not differentiated by name.

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 is only implied: an agent can infer this is the schema-inspection step before writing or explaining a query. There is no statement of when to prefer it over list_tables or explain_query, and no prerequisites or exclusions are given.

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