Skip to main content
Glama
postgres-mcp-server

postgres-mcp-server

by RenzoReccio

describe_table

Retrieve column structure, keys, and indexes for a PostgreSQL table to inspect schema details and understand table design before writing read-only SQL queries.

Instructions

Retrieve the column structure, keys, and indexes of a specific table

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

Input Schema

NameRequiredDescriptionDefault
tableNameYesThe name of the table to describe

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does disclose the read-only nature implicitly by naming a metadata retrieval and enumerates the returned facets (columns, keys, indexes), but says nothing about behavior on a missing table, permission requirements, or whether the output is formatted vs structured.

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 verb and the returned content, with zero redundant or filler wording. Nothing could be cut without losing information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter introspection tool with no output schema, the description adequately names the return payload (columns, keys, indexes). It stops short of characterizing format or error behavior, but the tool's complexity is low enough that this is a minor gap.

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 coverage is 100% and the single tableName parameter is fully documented in the schema, so the description adds no syntax or format detail beyond it. 'Specific table' only restates that one table is targeted, which is the baseline-3 case when the schema does the work.

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 ('Retrieve') and a precisely enumerated resource ('column structure, keys, and indexes of a specific table'), so an agent can tell what comes back. It does not explicitly contrast itself with list_tables or run_query, but the enumerated payload makes the distinction inferable.

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 statement, no prerequisite, and no named alternative. The agent must infer that this is a schema-inspection step preceding run_query, and nothing in the text confirms or rules that out.

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

Deploy Server

Other Tools