Skip to main content
Glama

List tables

list_tables

Lists every table in the connected SQLite or PostgreSQL database along with its row count, giving a quick orientation before writing queries. On PostgreSQL the count is a planner estimate, flagged as rows_estimated.

Instructions

Every table in the database with its row count. On PostgreSQL the count is the planner's estimate, marked rows_estimated, because counting every row of every table to orient is not cheap.

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

No arguments

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it delivers the single most important non-obvious trait: on PostgreSQL the count is a planner estimate flagged as `rows_estimated`, with the rationale that exact counts are expensive. It does not cover ordering, pagination, scope (which database/connection), or explicit read-only confirmation, so it is strong but not exhaustive.

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 with zero waste: the return content is front-loaded, and the second sentence earns its place by explaining the estimate flag and why it exists. Nothing could be cut without losing meaning.

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 zero-parameter tool with an output schema, the description is nearly complete, and it usefully explains the semantics of the `rows_estimated` field that the schema alone would not convey. Only scope details (which database, ordering, whether system tables are included) are left implicit.

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?

The tool takes zero parameters, so there is nothing for the description to disambiguate and the baseline of 4 applies. No parameter text is needed or missing.

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?

The description states the resource precisely ('Every table in the database with its row count'), so an agent knows exactly what comes back, and it is clearly distinct from siblings like describe_table or run_sql. It never names the verb 'list' explicitly, but the return shape makes the purpose unambiguous.

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: the phrase 'to orient' hints this is a first step before more targeted queries, but there is no explicit when-to-use vs. run_sql or describe_table guidance and no stated exclusions. An agent can infer the orientation role but must guess the boundaries itself.

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