Skip to main content
Glama

list_tables

Lists tables and views with approximate row counts for PostgreSQL and MySQL connections, optionally filtered by schema or database.

Instructions

List tables and views (type: table | view) with approximate row counts. For postgres, optionally filter by schema; for mysql, schema is the database.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input Schema

NameRequiredDescriptionDefault
schemaNo
databaseNo
connectionYesconnection name, see list_connections

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose two real behavioral traits: row counts are approximate and the schema parameter behaves differently per engine. However, it omits whether the operation is read-only (implied by "List" only), what permissions or connection state are required, and what happens for engines other than postgres/mysql.

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?

Two dense sentences with the core capability front-loaded and no filler. The second sentence is slightly compressed to the point of ambiguity ("for mysql, schema is the database"), but every clause carries information.

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

Completeness3/5

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

No output schema and no annotations, so the description must cover behavior, and it leaves gaps: the `database` parameter's role, which engines are supported, and whether results are paginated or capped. It is adequate for a simple listing tool but not complete.

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 description coverage is 33% (only `connection` is documented, by pointing at list_connections). The description compensates for `schema` by explaining its per-engine meaning, but the `database` parameter is left entirely unexplained, and it is unclear whether schema and database are mutually exclusive or aliases.

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 uses a specific verb and resource ("List tables and views") and adds scope detail: the type discriminator (table | view) and approximate row counts in the result. It is distinguishable from siblings like describe_table and list_databases, though it never explicitly contrasts itself with them.

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?

It gives engine-specific guidance for the schema filter (postgres vs mysql), which is useful usage context, but it never says when to prefer describe_table over this tool or what happens on unsupported engines. Usage is implied rather than stated with alternatives or exclusions.

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