Skip to main content
Glama

Create model

layerz_create_model

Creates a model and returns its detail with its UUID, in workspace_id (a workspace the caller belongs to; default the personal one) where every member of that workspace edits it. template_id copies a template (official, or from the library of a workspace the caller belongs to) into the new model with its sources, staged transactions and mapping rules under fresh ids (connector credentials excluded); the template itself is unchanged. timelines sets the grains and bounds (only the grains given: { monthly } alone gives a monthly-only model; on a template, the bounds), glyph its emblem (a kebab-case Lucide icon name, e.g. trending-up, landmark, house, coffee, wallet). file_id imports an uploaded workbook instead (deterministic compiler, no AI) and returns { model_id, name, status: "importing" } with guidance (the rebuild method) at once: the import runs after the response (about a minute for a large workbook), then its report (fidelity by scenario, residue, constructions map) lands in the model FINANCE.md (has_finance_md); a failed import deletes the model. The workbook stays with the model for layerz_diff { source }. Undated period headers return IMPORT_DECISION_REQUIRED with the axes to anchor (anchors). conventions carries the conventions of the workspace it lands in and its FINANCE.md (as in layerz_get_conventions) when either is set. Rejected past the plan model cap. Not advertised to model-scoped or read-only keys.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "layerz_create_model"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoModel name. Required without `file_id`; an imported workbook names the model after its file.
glyphNoEmblem icon: a kebab-case Lucide icon name (https://lucide.dev/icons), e.g. "trending-up", "coffee", "landmark". Shown in-app and on the social/OG card. Emojis/free text are rejected with suggestions. Aliases: cash/money→banknote, bank→landmark, cart→shopping-cart, chart/graph→chart-line.
anchorsNoWith `file_id`: the first period (`2026`, `2026-01`, `2026-Q1`) of each sheet whose period headers carry no date, as listed by an `IMPORT_DECISION_REQUIRED` error; `[]` leaves those sheets out.
file_idNoAn uploaded workbook (`layerz_create_upload_url`) the model is imported from by the deterministic compiler: live formulas, values where a formula has no equivalent, and the import report (`import`: fidelity, residue, recalculation coverage, constructions map). Exclusive with `template_id`.
subtitleNo
timelinesNo
template_idNo
workspace_idNoWorkspace the model is created in (one the caller belongs to; `layerz_list_models` lists them). Default: the personal workspace.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / anchors
      Added value: +{
      +  "description": "With `file_id`: the first period (`2026`, `2026-01`, `2026-Q1`) of each sheet whose period headers carry no date, as listed by an `IMPORT_DECISION_REQUIRED` error; `[]` leaves those sheets out.",
      +  "items": {
      +    "properties": {
      +      "sheet": {
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "start": {
      +        "minLength": 4,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "sheet",
      +      "start"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / file_id
      Added value: +{
      +  "description": "An uploaded workbook (`layerz_create_upload_url`) the model is imported from by the deterministic compiler: live formulas, values where a formula has no equivalent, and the import report (`import`: fidelity, residue, recalculation coverage, constructions map). Exclusive with `template_id`.",
      +  "pattern": "^f_[a-f0-9]{16}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / name / description
      Added value: +"Model name. Required without `file_id`; an imported workbook names the model after its file."
    • removedInput schema / required
      Removed value: -[
      -  "name"
      -]
  2. Changed1 schema field changed
    • addedInput schema / properties / workspace_id
      Added value: +{
      +  "description": "Workspace the model is created in (one the caller belongs to; `layerz_list_models` lists them). Default: the personal workspace.",
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the annotations, which only declare that this is a non-idempotent, non-destructive write. It discloses async behaviour and rough latency ("about a minute for a large workbook"), where the import report lands (`FINANCE.md`/`has_finance_md`), that a failed import deletes the model, that connector credentials are excluded from template copies, that the source template is unchanged, and that undated period headers raise `IMPORT_DECISION_REQUIRED` with `anchors`.

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 lead sentence front-loads the verb and return value, and nearly every clause carries new information for an 8-parameter, three-mode tool. It is, however, a single dense run-on paragraph with heavy parenthetical nesting, which makes it harder to scan than a few short mode-oriented sentences would be.

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?

With no output schema, the description carries the return-value burden itself and does so: the standard response shape, the special `file_id` shape (`{ model_id, name, status: "importing" }` plus `guidance`), the deferred report location, and the failure/rollback path. Nothing an agent needs to invoke this correctly on a nested-object tool appears absent.

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 63%, and the description compensates well: it explains the `workspace_id` default, the copy semantics of `template_id`, that `timelines` creates only the grains supplied ("`{ monthly }` alone gives a monthly-only model"), and the `anchors`/`IMPORT_DECISION_REQUIRED` loop. `subtitle` goes unexplained in both schema and description, and the glyph examples largely repeat the schema's own examples, so it stops short of a 5.

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?

Opens with a specific verb+resource ("Creates a model and returns its detail with its UUID") and then delineates the three creation paths — blank, `template_id` copy, `file_id` import — so an agent can tell which mode it needs without opening the schema. It also names concrete siblings it interacts with (`layerz_create_upload_url`, `layerz_diff`, `layerz_get_conventions`), which anchors it in the catalog.

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?

Usage conditions are explicit for each mode: `template_id` for copying a template, `file_id` "instead" for workbook import, `timelines` for grain scoping, plus availability guidance ("Not advertised to model-scoped or read-only keys") and the plan model cap. What is missing is routing against near-neighbours like `layerz_build_from_blueprint` — the description never says when to prefer that over this tool.

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