Skip to main content
Glama

List Database Tables

unfour.db.list_tables
Read-onlyIdempotent

Lists tables and views for a saved database connection using its connectionId, with optional catalog and schema filters. Helps explore database structure without ad-hoc connection strings.

Instructions

Lists tables and views for a saved database connection through the Unfour command bus. Optional catalog and schema scope the listing. Requires a saved connectionId; does not accept ad-hoc connection strings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of tables to return (default 200, max 500).
schemaNoOptional schema name. pg_catalog and information_schema are excluded even when specified.
catalogNoOptional database catalog. Omit to use the connection's default database.
workspaceIdNoOptional workspace ID. Uses the active workspace if omitted.
connectionIdYesRequired saved database connection ID.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
sourceYes
tablesYes
truncatedYes
totalTablesYes
connectionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.10.0
    • addedInput schema / properties / catalog
      Added value: +{
      +  "description": "Optional database catalog. Omit to use the connection's default database.",
      +  "type": "string"
      +}
    • addedInput schema / properties / schema
      Added value: +{
      +  "description": "Optional schema name. pg_catalog and information_schema are excluded even when specified.",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv0.6.0
    • addedOutput schema / properties / tables / items / properties / catalog
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  3. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so safety is covered. The description adds meaningful context beyond that: the operation runs through the 'Unfour command bus' and is restricted to saved connections, which is a real operational constraint. It adds little else (no pagination/return behavior), but that is largely carried by the output schema.

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?

Three short sentences, front-loaded with the core action, then scoping parameters, then the connection constraint. No filler or restatement of the title.

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?

With an output schema, rich annotations and fully documented parameters, the description only needs to establish scope and prerequisites, which it does. The one remaining gap is that it does not hint at result ordering or the effect of the limit parameter, but that is minor given the schema coverage.

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 100%, so the schema already documents limit, schema, catalog, workspaceId and connectionId in detail. The description only restates that catalog and schema scope the listing and that connectionId is required, adding no syntax or format information beyond the schema. Baseline 3 applies when the schema does the heavy lifting.

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 verb (Lists) and resource (tables and views) scoped to a saved database connection, which clearly separates it from siblings like unfour.db.describe_table and unfour.db.query_readonly. It does not explicitly name a sibling, but the resource scope makes the intent unmistakable.

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

Usage Guidelines4/5

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

Gives a clear precondition (requires a saved connectionId) and an explicit exclusion (does not accept ad-hoc connection strings), which tells the agent when this tool applies versus constructing a new connection. It stops short of naming an alternative tool for the ad-hoc case, so it is strong but not exhaustive.

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