Skip to main content
Glama
postgres-mcp

postgres-mcp

by cleondev

Describe a table

describe_table
Read-only

Inspect a PostgreSQL table or view to retrieve column types, nullability, defaults, comments, constraints, and indexes for schema understanding.

Instructions

Columns (type, nullability, default, comment), constraints and indexes of one table or view.

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 or view name, unquoted
schemaNoSchema name; required when the name exists in several schemas

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?

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds genuine value by disclosing the shape of the returned metadata (column attributes, constraints, indexes), but says nothing about behavior when the table does not exist or about name-resolution ambiguity across schemas beyond the schema parameter itself.

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?

A single compact clause with zero filler, and the return content is front-loaded. It is telegraphic to the point of omitting a verb, but every word carries 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 simple two-parameter read tool with annotations covering safety and no output schema, the description usefully stands in for the missing output schema by listing the metadata returned. Only error/ambiguity behavior is left unstated, which is a minor gap at this complexity.

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%, so both parameters (table, schema) are already fully documented in the schema, including the conditional requirement for schema. The description adds no additional semantics such as case sensitivity or qualified-name formatting, so the baseline 3 applies.

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 names a specific resource ('one table or view') and enumerates exactly what it returns (columns with type, nullability, default, comment, plus constraints and indexes), so an agent can tell it apart from list_tables or query. It is a noun phrase rather than a verb phrase, so the action ('describe'/introspect) is only implied by the tool name.

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 explicit when-to-use guidance, no statement of prerequisites, and no reference to the sibling tools it competes with (list_tables for enumeration, query for data retrieval). Usage is only inferable from the fact that it targets a single named table.

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