Skip to main content
Glama

list_table_structure

Read-onlyIdempotent

Show columns of a PerfettoSQL table or view: name, type, nullability, primary key flag. Helps resolve 'no such column' errors by revealing the schema.

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
trace_idNoOptional trace id returned by `load_trace`. Omit to use the active trace.
table_nameYesName of the table to describe. Also accepted as `name` for callers who model schema discovery around a generic "name" field.
Behavior4/5

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

Annotations already indicate safe read-only operation. The description adds behavioral details: case-sensitivity, alias support, error conditions, and the need to call list_tables first. This provides useful context beyond annotations.

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?

Description is compact and well-structured: summary, when/not to use, parameter details, error info. Every sentence earns its place with no redundancy.

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?

Despite no output schema, the description adequately explains what is returned (columns attributes) and handles error conditions. It also provides prerequisite guidance (call list_tables) and version info for alias, making it complete for the tool's complexity.

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?

Input schema covers 100% of parameters, but the description adds extra meaning: case-sensitive, no pattern matching, accepts alias 'name'. This exceeds the baseline of 3 for high coverage.

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 clearly states it shows columns of a table/view with specific attributes (name, type, nullability, primary_key). This distinguishes it 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?

Explicitly tells when to use (after 'no such column' error) and when not to use (not a SQL function). Provides alternative actions like calling list_tables first and noting stdlib views may need INCLUDE.

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