Skip to main content
Glama

list_table_structure

Show columns (name, type, nullable, primary key) of any table or view. Use after a 'no such column' error to inspect schema without guessing.

Instructions

Show the columns of a table or view: name, type, nullability, primary-key flag.

Use when: writing or debugging a query — call this immediately after a no such column error to inspect the actual schema rather than guessing. Both stdlib views and base tables have fixed schemas; don't infer columns by analogy across them.

Don't use for: this is a separate MCP tool, not a SQL function — don't write SELECT * FROM list_table_structure inside execute_sql.

Parameters: table_name (string) — the exact table or view name as it appears in list_tables output. Case-sensitive; does not accept GLOB patterns or partial matches. Also accepts the alias name (v0.11.3+).

Errors when: the table doesn't exist or has no columns. Call list_tables first if uncertain about the name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_nameYesName of the table to describe. Also accepted as `name` for callers who model schema discovery around a generic "name" field.
Behavior5/5

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

No annotations exist, so description carries full burden. Discloses case-sensitivity, alias support (name), rejection of GLOB/partial matches, errors on non-existent tables, and fixed schema nature of views/tables. Adequately covers behavior without contradiction.

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?

Compact but well-organized with labeled sections (use when, don't use for, parameters, errors). Front-loaded with core purpose. No fluff; every sentence serves a clear informative role.

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?

Fully addresses usage scenarios, input constraints, error conditions, and references sibling tools. For a simple tool with one parameter and no output schema, the description is comprehensive and leaves no ambiguity.

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 100% with a basic description. Description adds critical details: case-sensitivity, no GLOB/partial matches, exact name requirement, alias 'name' for v0.11.3+. Adds meaningful value beyond schema.

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?

Clear verb ('Show') and resource ('columns of a table or view'), specifies output aspects (name, type, nullability, primary-key flag). Distinguishes from sibling tools like list_tables (lists tables, not columns) and execute_sql (not a function).

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?

Explicitly states when to use (after 'no such column' errors, query debugging) and when not to (not as SQL function inside execute_sql). Provides concrete context and alternative (list_tables first).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tooluse-labs/perfetto-mcp-rs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server