Skip to main content
Glama
postgres-mcp

postgres-mcp

by cleondev

List tables

list_tables
Read-only

Lists PostgreSQL tables, views, and materialized views with estimated row counts and size, optionally across all user schemas when no schema is specified.

Instructions

List tables, views and materialized views with estimated row counts and size. Omit schema to list every user schema.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_tables"
  }
}

Input Schema

NameRequiredDescriptionDefault
schemaNoSchema name; omit for all user schemas

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds that row counts are estimates and that only user schemas are included by default, but says nothing about cost, pagination, or how large catalogs are handled.

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?

Two sentences, both front-loaded with the highest-value information (what is listed, then the default scope) and 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 single-optional-parameter read tool with no output schema, the description covers the object types returned and the default scope. Output field-level detail is only partially covered by the mention of row counts and size, but that is sufficient to call it correctly.

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 single parameter is already documented as 'Schema name; omit for all user schemas'. The description restates that behavior rather than adding format, casing, or matching rules, so the schema does the heavy lifting.

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 (list) and an expanded resource set (tables, views, materialized views), plus what metadata comes back. It does not explicitly differentiate itself from describe_table, but the object-listing scope is unambiguous from the wording alone.

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?

The only usage guidance is parameter-level: omitting schema lists every user schema. There is no statement of when to reach for this versus describe_table (single-object detail) or query, so an agent must infer the discovery role.

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