Skip to main content
Glama
Postgres MCP

Postgres MCP

by freakynit

Get complete table description including columns, indexes, triggers, and constraints for one more tables

describe_tables

Get detailed metadata for one or more PostgreSQL tables, including columns, indexes, triggers, foreign keys, and constraints to inspect schema structure.

Instructions

Get comprehensive table information for one or more tables including columns, indexes, triggers, foreign keys, and constraints

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_names": "<table_names>"
    },
    "name": "describe_tables"
  }
}

Input Schema

NameRequiredDescriptionDefault
table_namesYesArray of table names
table_schemaNoPostgres table schema namepublic

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

A3.5/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. "Get" plus the metadata listing signals a non-mutating introspection call, and the field enumeration effectively describes the return shape in the absence of an output schema. It says nothing about what happens with nonexistent tables, permission requirements, or response size for large schemas.

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 front-loaded sentence with no filler; the enumerated metadata is the highest-value information and appears immediately. Nothing is redundant, though it is terse enough that a second sentence on prerequisites or error cases could have been added without bloat.

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 read-only introspection tool with only two parameters and no output schema, the description covers the essentials, including a substitute for the missing output schema by listing returned metadata categories. The remaining gap is behavioral edge cases (invalid table names, cross-schema lookups) rather than core invocation knowledge.

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 description coverage is 100%, so both parameters are already documented in the schema, and the baseline of 3 applies. The phrase "one or more tables" reinforces that table_names is a batch parameter, but the description adds no format guidance for the array elements or for table_schema defaults.

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?

Specific verb ("Get") plus resource ("table information") and an enumeration of the exact metadata returned: columns, indexes, triggers, foreign keys, constraints. That enumeration implicitly separates it from list_tables, which by name only enumerates tables rather than describing them. It stops short of explicitly naming the sibling, so it lands at 4 rather than 5.

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 tool for inspecting structure once it knows which tables exist, and that list_tables precedes it. There is no explicit when-to-use, no when-not-to-use, and no mention of execute_raw_query or switch_database as alternatives. Adequate but leaves routing to inference.

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