Skip to main content
Glama
milad-codes

pg-readonly-mcp

by milad-codes

Describe table

describe_table
Read-onlyIdempotent

Inspect a PostgreSQL table’s columns, primary and foreign keys, constraints, and indexes to understand its schema before writing queries.

Instructions

Columns (type, nullability, default, comment), primary key, foreign keys, unique and check constraints, and indexes of one table.

Input Schema

NameRequiredDescriptionDefault
tableYes"table" or "schema.table"

Output Schema

NameRequiredDescriptionDefault
kindYes
nameYes
schemaYes
columnsYes
commentYes
indexesYes
totalSizeYes
primaryKeyYes
foreignKeysYes
estimatedRowsYes
checkConstraintsYes
uniqueConstraintsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is fully covered. The description adds nothing beyond that: it does not say what happens if the table does not exist or what the output structure looks like, though an output schema exists to cover the latter.

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 scope qualifier ('of one table') is placed at the end where it can't be missed. Slight deduction for being a sentence fragment that spends its words listing return fields already covered by the output schema.

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?

With an output schema and full annotation coverage, the description needn't explain return values, yet it does so at the expense of usage context. For a trivial one-parameter introspection tool this is just about adequate, but it omits error behavior (unknown table) and its role in the query workflow.

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 schema itself documents the 'table' or 'schema.table' format, so the description's only contribution is 'of one table', reinforcing that a single table is accepted rather than a list. That matches baseline 3 for schema-driven parameters.

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 noun phrase enumerates exactly what the tool returns for a single table (columns with type/nullability/default/comment, keys, constraints, indexes), which distinguishes it from list_tables and run_query by scope and content. It lacks an explicit verb, but combined with the name the intent is unambiguous.

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 guidance, no mention of prerequisites, and no reference to the sibling tools. An agent must infer that this is the schema-inspection step before run_query or explain_query.

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