Skip to main content
Glama
azmym

postgres-mcp

by azmym

describe_schema

Describe database schemas and tables with read-only precision. Retrieve tables, views, columns, constraints, and indexes for a schema or a specific table.

Instructions

Describe a schema's tables, or one table's columns and indexes.

Without table, lists the schema's tables, views and column counts. With table, returns that table's columns, constraints and indexes. Always read-only, even against a writable database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNo
schemaNopublic
databaseYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/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 burden of behavioral disclosure. It explicitly states that the operation is always read-only, even against a writable database, and it clarifies the two distinct behaviors based on the table parameter. This adds meaningful safety and behavior context beyond the schema.

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 compact and well-structured: it states the core purpose first, then uses a clear without/with contrast to explain behavior. Every sentence earns its place, and the read-only note is brief but high-value.

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?

The description covers the two main behaviors, the read-only guarantee, and the inputs that matter most. An output schema exists, so not detailing return values is acceptable. A small gap is that it does not mention how schema and database relate or what happens if the database or table does not exist, but for a read-only introspection tool this is minor.

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 0%, so the description needs to explain parameters. It does explain the table parameter thoroughly (without vs. with behavior), but it does not add meaning for database or schema beyond their obvious names. The schema default values are visible in the input schema, so this is partially compensated.

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 opens with a specific verb and resource ('Describe a schema's tables, or one table's columns and indexes') and then details both invocation modes. This clearly distinguishes it from siblings like list_databases and execute_sql.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly explains when to use the tool without a table (list tables, views, column counts) versus with a table (columns, constraints, indexes). It also signals that this is the safe introspection alternative by noting it is always read-only, but it does not explicitly name execute_sql as the write-capable alternative.

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