Skip to main content
Glama

list_tables

Retrieve all tables and views in a PostgreSQL schema with estimated row counts, sizes, and comments. Eliminates guesswork when assessing database structure and storage for optimization.

Instructions

List all tables and views in a given schema with estimated row counts, sizes, and comments

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaNoPostgreSQL schema name (default: "public")public
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses that row counts are 'estimated', implying inexactness, and mentions sizes and comments. However, it does not clarify that this is a read-only operation, whether it queries system catalogs, performance implications, or permission requirements. Some transparency but gaps remain.

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?

The description is a single, well-structured sentence that starts with the action and resource, then specifies the additional details returned. Every word adds value; no fluff. Perfectly concise for a 1-param tool.

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?

Given no output schema, the description informs the user about the return content (estimated row counts, sizes, comments). It does not specify the return format (e.g., list of objects), ordering, or whether it includes all tables/views. Still, it covers the main expected output adequately for a simple list tool.

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?

The input schema has one parameter with 100% description coverage (including default value and meaning). The tool description does not add to parameter semantics beyond listing return fields. With full schema coverage, baseline score of 3 is appropriate; the description provides no extra parameter context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it lists tables and views in a given schema, and specifies the additional information provided (estimated row counts, sizes, comments). This distinguishes it from siblings like list_schemas and describe_table, as it targets schema-level table enumeration with metadata.

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?

The description offers no explicit guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., needing to know the schema name via list_schemas first) or when to prefer describe_table for detailed table info. No usage context or exclusions are given.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mewsyy/pg-context'

If you have feedback or need assistance with the MCP directory API, please join our Discord server