Skip to main content
Glama

list_tables

Lists tables in a database, optionally filtered by name pattern, showing row counts and stale-statistics verdicts from a dbprint snapshot without a live database connection.

Instructions

List a connection's tables, optionally narrowed by an fnmatch pattern over the dotted names. Use it to see which tables exist, their row counts, and whether each table's statistics are stale: detail: true adds each table's type, row_count, columns and profiled_at, and a freshness verdict - live, stale, or dormant when profiled_at is unreadable - with its age_days and the max_age_days it is judged against. A table whose threshold cannot be resolved carries threshold_error instead of a verdict. To find columns rather than tables, use search_columns; for the print's raw table index, get_manifest. Paged: every reply carries the total matched, and next_cursor while more remain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNo`next_cursor` from this call's previous page; omit for the first page
detailNoProject each entry's type/row_count/columns/profiled_at from the print's index plus its freshness verdict; false returns bare FQN strings, unchanged
patternNofnmatch glob over dotted table names, e.g. 'sales.*'; defaults to '*'
connectionNoWhich database to read, by connection name; needed only when the server serves several, and the error for a missing one lists them. Omit it for the server's default

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it discharges most of it: it discloses what detail:true projects (type, row_count, columns, profiled_at), the freshness verdict vocabulary (live/stale/dormant), the threshold_error fallback, and pagination semantics (total always present, next_cursor while more remain). It omits permission/auth requirements and any rate-limit or cost behavior, which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and alternative routing before descending into the detail-flag payload, so an agent can stop reading early. The middle clause about freshness verdicts is dense and slightly over-packed for the 10% weight it carries, but no sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description must explain return values, and it does: bare FQN strings by default, the enriched fields under detail:true, the verdict logic, and the paging envelope with total and next_cursor. Combined with the connection-omission error note, an agent has everything needed to call and interpret this tool.

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?

Schema coverage is already 100%, so parameter documentation is largely handled there and the baseline is 3. The description adds genuine meaning beyond the schema by explaining what the projected fields mean and what verdicts imply, and by noting the connection-missing error lists available connections. Pattern/cursor semantics are essentially restated from the schema rather than extended.

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?

States a specific verb and resource ('List a connection's tables') plus a scoping modifier (fnmatch pattern over dotted names). It explicitly distinguishes itself from siblings ('To find columns rather than tables, use search_columns; for the print's raw table index, get_manifest'), so an agent can route without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a positive use case ('see which tables exist, their row counts, and whether statistics are stale') and names two explicit alternatives with the condition that selects each ('To find columns rather than tables, use search_columns; for the print's raw table index, get_manifest'). Nothing is left to inference.

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