Skip to main content
Glama
ranson21

postgres-readonly-mcp

by ranson21

list_tables

List tables and views in a PostgreSQL schema (defaults to public) for read-only discovery, so agents can identify available data before writing queries.

Instructions

List tables and views 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.
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?

With no annotations, the description carries the full behavioral burden, and it does disclose the key trait: 'Read-only.' That is genuinely useful safety context. However, it says nothing about pagination, result limits, ordering, or permissions, so it is only partially complete for a no-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 compact sentence, front-loaded with the action and resource, followed by the default and the read-only note. Every clause earns its place with no filler.

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 no output schema, the description covers what is listed, the default schema, and the safety profile. It is slightly thin on what the listing returns (names only? with types?), but no critical calling information is missing.

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 (env, schema) are already documented, including the 'public' default and the enum note. The description merely restates the schema default, adding no syntax or format detail beyond the schema. 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?

States a specific verb and resource (list tables and views) plus the scope (a schema, defaulting to public), which cleanly separates it from list_schemas and describe_table. It does not explicitly name or contrast with any sibling, so it falls just short of 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 implied by the name and resource: reach for it to discover what tables/views exist before describing or querying them. There is no explicit when-to-use guidance, no mention of when to prefer list_schemas or describe_table, and no stated prerequisites.

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