Skip to main content
Glama

create_table

Create a table in a model. name is required: ask if the user gave none. Declare columns as name + data_type (as list_column_types spells it). A categorical column takes its labels in categories. Columns may also carry description, unit (a uri from search_units) and nullable: false (required); the table its description, unique_keys and checks (columns by name). FROM SQL: pass sql, a DataFusion SQL SELECT over this model's own tables in ids as run_sql takes them, every output column aliased: the alias is the column's name. Its rows fill the table once, at any size; it stays editable, nothing re-runs it, and the SQL is kept as its origin. Then columns is optional: each names an alias to give it categories, a description, a unit or nullable, and a data_type only to make it categorical; a value its categories do not name refuses the create (dry_run lists them first). Keys and checks follow with set_table_metadata. Cleaning an import keeps the original. Reading a recipe RESULT copies it: only a space manager may, and only if they could share every table it reads. A refused column is named and nothing is made.

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": {
      "model_id": "<model_id>",
      "name": "<name>"
    },
    "name": "create_table"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlNoA SELECT over this model's tables, every output column aliased (see the tool description).
nameYesTable name, required and not blank: what everyone sees on the canvas.
checksNoThe table's checks, naming columns by their `name` above. Not with `sql`.
columnsNoThe table's columns (name + type each). Without `sql`, at least one: rows are keyed by `column_id`. With `sql`, optional, and each names an output alias to give its type, categories, description, unit or `nullable`.
dry_runNoWith `sql`: count rows and list values outside `categories`; create nothing.
model_idYesThe model to create the table in.
descriptionNoWhat the table holds: what one row is.
unique_keysNoThe table's unique keys, naming columns by their `name` above. Not with `sql`.
idempotency_keyNoStable unique string: a repeat with the same key returns the first call's table.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations only say this is not read-only and not destructive; the description adds much more — rows from `sql` are filled once at any size, remain editable, never re-run, and the SQL is retained as provenance. It also discloses failure behavior (a named refused column, nothing created), permission constraints for copying a recipe result (space manager plus shareable input tables), and that cleaning an import preserves the original.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The essential requirement (name, columns, then SQL mode) is front-loaded, and every sentence carries information, but the prose is a dense wall with elliptical constructions ("the table its `description`, `unique_keys` and `checks`") and an all-caps section marker. It is informative rather than skimmable.

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?

For a 9-parameter creation tool with nested column/key/check schemas and no output schema, the description covers both modes, the preview path, atomicity, and permission gating. The one real omission is what the call returns (e.g. the new table's identifier) beyond the idempotency-replay remark.

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 already 100%, so the baseline is 3; the description earns extra credit by explaining cross-parameter relationships: with `sql`, `columns` becomes an alias-keyed overlay where `data_type` only exists to make a column categorical, and `unique_keys`/`checks` are excluded from that path. It also pins `data_type` spelling to `list_column_types` and `unit` URIs to `search_units`, which orients the agent to the right lookup tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource ("Create a table in a model") and clearly separates the two creation modes (declared columns vs. `sql`-backed). It also distinguishes itself from `set_table_metadata` (keys/checks follow-up) and points to `list_column_types`/`search_units` for value vocabularies, though it never contrasts itself with other creation-adjacent siblings such as `add_column` or `create_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?

Gives concrete conditional guidance: ask the user for `name` if absent, use the SQL path when populating from existing model tables, follow with `set_table_metadata` for keys/checks, and use `dry_run` to preview category violations before a refused create. It does not explicitly state when to choose a different tool for building a table, so a small gap remains.

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