Skip to main content
Glama
jesse-smith
by jesse-smith

list_schemas

List all schemas in a database with their table and view counts, excluding system schemas, to quickly assess database structure.

Instructions

List all schemas in the connected database.

Returns schemas with table and view counts, sorted by table count descending. Excludes system schemas (sys, INFORMATION_SCHEMA, guest).

Args: connection_id: Connection ID from connect_database catalog: Optional Databricks catalog name. Overrides the connection's default catalog. If omitted on a Databricks connection, the connection's configured default catalog is used (SHOW SCHEMAS IN). Rejected on non-Databricks dialects (raises an error).

Returns: TOON-encoded string with schema list:

    status: "success" | "error"
    total_schemas: int                 // on success only
    schemas: list                      // on success only
        schema_name: string
        table_count: int
        view_count: int
    error_message: string              // on error only

Error conditions: - Invalid connection_id: returns status "error" with error_message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
catalogNo
connection_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/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. It discloses the exact return format (TOON-encoded string with status, total_schemas, schemas list, error_message), error conditions (invalid connection_id), and dialect-specific behavior (catalog override, rejection on non-Databricks). This is exceptionally transparent about what the tool does and what the agent can expect, going beyond basic operation details.

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 well-structured with clear sections (Args, Returns, Error conditions). It leads with the core purpose, then details parameters and return format. Every sentence adds necessary information; there is no fluff. The length is appropriate for the tool's complexity, and the format aids scanning.

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?

Given the tool's moderate complexity (2 parameters, dialect-specific behavior, structured output), the description is complete. It covers purpose, parameter semantics, return format, error handling, and even the sorting and filtering behavior. An agent has everything needed to invoke the tool correctly and interpret results, even without relying on the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does so thoroughly: connection_id is explained as coming from connect_database, and catalog is fully described with its Databricks-specific override behavior and the error raised on non-Databricks dialects. This adds substantial meaning beyond the schema's type-only definitions, making parameter usage clear.

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 states a specific verb ('List'), resource ('all schemas'), and scope ('in the connected database'). It also adds distinguishing details: returns table/view counts, sorted by table count descending, excludes system schemas. This clearly separates it from siblings like list_tables (which lists tables) and get_table_schema (which targets a specific table).

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?

The description provides clear context: it requires a connection_id from connect_database and explains the optional catalog parameter with dialect-specific behavior. It implies this is the tool for schema discovery, but it does not explicitly name alternatives or state when not to use it. No exclusions beyond system schemas are mentioned, and no sibling alternatives are referenced, so it stops short of explicit when/when-not guidance.

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