Skip to main content
Glama

list_tables

Read-only

Retrieve all readable tables, views, and foreign tables within a PostgreSQL database. Specify a schema to filter results and inspect the database structure.

Instructions

Tables, views and foreign tables the role can read, with row estimates and comments. At most 200; pass schema to narrow.

Input Schema

NameRequiredDescriptionDefault
schemaNoOnly list objects in this schema; omit it to list every schema.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.0
    • changedInput schema / properties / schema / description
      Previous value: -"Only list objects in this schema, e.g. \"public\". Omit to list all schemas."New value: +"Only list objects in this schema; omit it to list every schema."
  2. First observedv0.5.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds genuinely new behavioral facts: the listing is permission-scoped ('the role can read'), returns row estimates and comments, and is capped at 200 results — a real limit the agent must plan around. It stops short of saying whether exceeding 200 truncates silently or errors.

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, zero filler, and the output contents are front-loaded ahead of the cap and the parameter hint. Every clause carries information.

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?

No output schema exists, and the description compensates by naming what comes back (row estimates, comments). For a one-parameter read-only listing tool that is sufficient; the only remaining ambiguity is the truncation behavior at the 200 cap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With one parameter and 100% schema coverage, the schema already defines 'schema'. The description adds meaning beyond it by tying the parameter to the 200-result cap — narrowing the schema is presented as the mitigation for the limit, which is a usage-level insight the schema doesn't convey.

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 resource (tables, views, foreign tables) with a scope qualifier ('the role can read') and even names the payload fields (row estimates, comments). It doesn't explicitly contrast itself with describe_table or search_schema, but an agent can tell this is the enumeration tool.

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?

'At most 200; pass schema to narrow' implies the use case (browse an inventory, narrow by schema) and surfaces the result cap, but there is no explicit when-to-use guidance versus siblings like search_schema or describe_table, and nothing about when-not to call it.

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