Skip to main content
Glama
codedb-io

codeDB Lens

Official

list_tables

Read-only

Lists tables and views visible to a database profile's login, including schema, type, row counts, size, and read access, so you can pick a table before describing its schema or querying.

Instructions

Tables and views visible to the profile's login in a database: schema, name, type, estimated rows, size and whether the login can read them. Start here, then describe_table, then query.

Input Schema

NameRequiredDescriptionDefault
filterNoname pattern: plain text matches anywhere in the name, or a LIKE pattern with %
schemaNoonly this schema
profileYesprofile name from list_profiles
databaseNodatabase name from list_databases; default: the profile's

Output Schema

NameRequiredDescriptionDefault
noteNo
rowsYes
columnsYes
truncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.0

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the readOnlyHint=true annotation, the description discloses the important scoping constraint that results are limited to what the profile's login can see, and that readability per table is reported. It omits pagination/row-limit behavior, which is the main remaining unknown for a listing tool.

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 compact sentences, front-loaded with the resource and returned fields, followed by the workflow hint. No filler and nothing repeated from the schema.

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?

An output schema exists, so return values need no prose explanation, and annotations cover safety. Combined with the workflow hint and the login-scoping caveat, an agent has everything needed to call this correctly.

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 filter, schema, profile, and database are already fully documented in the schema. The description adds only the concept of login-scoped visibility filtering, not per-parameter semantics; baseline 3 applies.

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?

Names a specific verb and resource ('list_tables') and then enumerates exactly what each row contains (schema, name, type, estimated rows, size, read permission), which no sibling offers. An agent can distinguish it from describe_table, list_databases, and query without opening a 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?

The sentence 'Start here, then describe_table, then query' is an explicit workflow that names two alternatives and the order in which to use them. This is the strongest form of routing guidance: it says when to use this tool and what to use next.

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