Skip to main content
Glama

describe_table

Read-only

Describe a table: its columns, links, capabilities and, on request, sample rows.

A columns[] description is prose the modeler wrote: it is the modeler's intent and outranks your reading of the name.

A categorical column carries categories: [{id, label}] in user order; its length is the exact cardinality. In run_sql a categorical cell is a LIST of ids: filter with array_has("col-…", 2) (never = or IN), and count per option with summarize_column or UNNEST (a GROUP BY groups whole cells). A cell may hold several options. Writes take LABELS, not ids, and replace the cell's options; update_categories edits the options.

include_sample_rows: true (with sample_rows_n, 1..=5, default 3) adds sample_rows. Each row carries a row_id: the handle edit_rows takes, and _row_id in run_sql, where you select it for rows not sampled. Rows come in storage order (an edited row moves to the end), so find specific rows with run_sql. Attachment cells show file NAMES; the column carries app_url for the person.

links lists declared TableLinks. A kind "membership" means the scalar occurs in the other side's list_string column, and the entry carries the exact join_predicate to paste. from_columns/to_columns pair by position; part of a composite key is a looser join that multiplies rows. Every to_table_id is readable through this connection.

datasets names the datasets holding this table.

capabilities says what you may do. A false may mean no permission OR a read-only table: connector-fed (Google Sheet, Postgres, Supabase, bucket, local SQLite) or imported. Do not retry. A connector table is fixed at its source and the next sync brings it in; a copy (create_table with sql) is editable but no longer syncs.

recipe appears only on a recipe RESULT: recipe_id, version, args and picks (in run_recipe shape), lens and can_view_recipe. describe_recipe shows the definition, run_recipe asks again, materialize_recipe refreshes the table. A result takes no edits, links or shares.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "table_id": "<table_id>"
    },
    "name": "describe_table"
  }
}

Input Schema

NameRequiredDescriptionDefault
table_idYesTable id (`tab-…`) from `list_tables` / `search`.
sample_rows_nNoSample rows to return, 1..=5. Default 3.
include_sample_rowsNoAdd `sample_rows` (see the tool description). Costs one extra scan.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true, while the description discloses substantial behavior: categorical cells are lists of ids in run_sql, cells may hold multiple options, connector tables are read-only and sync, copies do not sync, capabilities false may mean permission or read-only, sample rows come in storage order, and recipe results cannot be edited/linked/shared. This is far beyond the annotation and directly supports correct interpretation.

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?

The description is long but well-structured and front-loaded: purpose first, then column semantics, sample rows, links, datasets, capabilities, and recipes. Given the rich return surface, the detail is largely justified, though some passages about writes and run_sql go beyond this tool's immediate scope.

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?

No output schema exists, so the description must explain the return shape, and it does: columns, categories, links, datasets, capabilities, sample_rows, and recipe. It is complete enough for an agent to understand what metadata it will receive and how to interpret edge cases.

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 coverage is 100% and the schema already documents table_id, sample_rows_n, and include_sample_rows. The description reinforces the sample-rows interaction and row_id semantics but adds little new parameter syntax; it also says 1..=5 while the schema allows a minimum of 0. Baseline 3 is appropriate.

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 first sentence names a specific verb (describe) and resource (a table) and enumerates the returned facets: columns, links, capabilities and optional sample rows. That makes it easy to distinguish from list_tables/search and from describe_recipe.

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 gives multiple conditional routes: use run_sql to find specific rows, summarize_column/UNNEST for counts, describe_recipe/run_recipe/materialize_recipe for recipe inspection, and create_table with sql for an editable copy. It does not give an overall when-to-use-vs-when-not statement, but the conditional guidance is clear.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources