Skip to main content
Glama
ranson21

postgres-readonly-mcp

by ranson21

describe_table

Get column names, types, nullability, defaults, and primary keys for a PostgreSQL table. Use it to understand a table's structure before writing queries.

Instructions

Describe a table's columns (name, type, nullable, default, primary key) in a schema (default: public). Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNoWhich configured database environment to use. Only "default" is configured, so this can be omitted.
tableYesTable name
schemaNoSchema name, defaults to "public"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the behavioral burden. It does declare 'Read-only', which is valuable safety context, but omits what happens on an unknown table/schema (error vs empty) and whether it touches metadata only. Some value added, but thin for a zero-annotation tool.

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?

A single front-loaded sentence: verb, resource, returned fields, then the default and safety note appended. No filler, every clause earns its place.

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?

There is no output schema, but the description compensates by enumerating the returned columns, so an agent knows what to expect. Minor gap: no indication of error behavior or whether schema/table are case-sensitive, but the essentials are covered.

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 all three parameters are already documented in the schema, including the 'public' default. The description's '(default: public)' simply restates the schema's own note and adds no new semantics. Baseline 3.

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?

States a specific verb ('Describe') and resource ('a table's columns') and enumerates exactly what is returned (name, type, nullable, default, primary key). It does not name or distinguish itself against siblings like list_tables or run_query, which would be needed for a 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 introspection tool used before querying, but the description never says when to prefer it over list_tables or run_query, nor any prerequisites. Minimum viable guidance, no explicit when-to-use or exclusions.

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