Skip to main content
Glama

list_table_structure

Read-onlyIdempotent

Inspect table columns (name, type, nullable, primary key) to resolve SQL 'no such column' errors 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; stdlib views may need an INCLUDE first.

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?

Annotations already declare readOnlyHint, destructiveHint, idempotentHint. Description adds value by detailing error conditions, case sensitivity, alias support, and context about stdlib views needing INCLUDE.

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?

Description is detailed but each sentence is informative. Front-loaded with purpose. Slightly lengthy but justified by the need for clear usage guidelines.

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?

Despite no output schema, the description lists returned fields. Could improve by explicitly stating the output format (e.g., rows of columns), but currently sufficient.

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 coverage is 100% with a description for table_name. Description adds crucial details: case-sensitive, exact match, alias 'name', and prerequisite calls.

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 explicitly states 'Show the columns of a table or view' with a clear verb and resource. It distinguishes from sibling tools like list_tables and execute_sql.

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?

Provides explicit when-to-use ('writing or debugging a query') and when-not-to-use ('not a SQL function'). Also gives alternatives like calling list_tables first and noting INCLUDE for stdlib views.

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