Skip to main content
Glama

Link, refresh or unlink external reference

layerz_external_ref
Destructive

Manages the links from this model to items of other Layerz models (an external ref, like an Excel linked workbook), by op. link: creates (or retargets, with uid) a non-list assumption whose values hold a snapshot of the source item's computed series projected to this model's grain (null outside the source's coverage); requires read access to the source model; the line is referenceable in formulas like any assumption; up to 200 links in links (one form per call) load each source once, are validated whole (one failure writes nothing) and return results. refresh: re-reads every linked source (or uids) and rewrites the snapshots, the only way the values move; a per-link failure (source or item gone) leaves the stored values intact; when values change, the pre-refresh state is snapshotted first (Auto-backup before refresh). unlink: detaches the line uid, keeping its values as an ordinary assumption. A self-link is rejected; a cross-model cycle resolves one hop per refresh. Link status and staleness: layerz_list_integrations { include_external_refs: true }. Persists one version labelled with summary. Not advertised to read-only keys.

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": {
      "summary": "<summary>",
      "op": "<op>"
    },
    "name": "layerz_external_ref"
  }
}

Input Schema

NameRequiredDescriptionDefault
opYeslink | refresh | unlink.
uidNo`link`: existing non-list assumption to retarget. `unlink`: the linked line to detach.
nameNo`link`: display name (default: the source item's name).
uidsNo`refresh`: restricts the refresh to these linked items (default: all).
linksNo`link`: up to 200 links written as one batch, in place of the flat fields.
parentNo`link` (create): parent container uid (section / formula / balance / dashboard).
summaryYesShort note (3–100 chars) describing the change, stored as the label of the resulting version. Examples: "Renamed Revenue to Net Revenue", "Imported 2024 OPEX from Excel".
model_idNoTarget model UUID. Required for user-scoped API keys; validated against the bound model for model-scoped keys.
source_uidNo`link`: uid of the source item in that model.
timeline_refNo`link`: grain of the linked line (default: the source's grain when active here, else the finest active grain).
source_model_idNo`link`: the model read from.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / links
      Added value: +{
      +  "description": "`link`: up to 200 links written as one batch, in place of the flat fields.",
      +  "items": {
      +    "properties": {
      +      "name": {
      +        "description": "`link`: display name (default: the source item's name).",
      +        "maxLength": 200,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "parent": {
      +        "description": "`link` (create): parent container uid (section / formula / balance / dashboard).",
      +        "maxLength": 100,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "source_model_id": {
      +        "description": "`link`: the model read from.",
      +        "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"
      +      },
      +      "source_uid": {
      +        "description": "`link`: uid of the source item in that model.",
      +        "maxLength": 100,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "timeline_ref": {
      +        "description": "`link`: grain of the linked line (default: the source's grain when active here, else the finest active grain).",
      +        "enum": [
      +          "constant",
      +          "monthly",
      +          "quarterly",
      +          "yearly"
      +        ],
      +        "type": "string"
      +      },
      +      "uid": {
      +        "description": "`link`: existing non-list assumption to retarget.",
      +        "maxLength": 100,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "source_model_id",
      +      "source_uid"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 200,
      +  "minItems": 1,
      +  "type": "array"
      +}
  2. Changed11 schema fields changed
    • changedInput schema / properties / model_id / description
      Previous value: -"Target model UUID. Required for user-scoped API keys; ignored (or validated against scope) for model-scoped keys."New value: +"Target model UUID. Required for user-scoped API keys; validated against the bound model for model-scoped keys."
    • changedInput schema / properties / name / description
      Previous value: -"`link` only: display name (defaults to the source item's name)."New value: +"`link`: display name (default: the source item's name)."
    • changedInput schema / properties / op / description
      Previous value: -"link (create/retarget a ref) | refresh (re-sync snapshot values)."New value: +"link | refresh | unlink."
    • changedInput schema / properties / op / enum
      Previous value: -[
      -  "link",
      -  "refresh"
      -]New value: +[
      +  "link",
      +  "refresh",
      +  "unlink"
      +]
    • changedInput schema / properties / parent / description
      Previous value: -"`link` create only: parent container uid (section/formula/balance/dashboard)."New value: +"`link` (create): parent container uid (section / formula / balance / dashboard)."
    • changedInput schema / properties / source_model_id / description
      Previous value: -"`link` only: the model to read from (id from layerz_list_models)."New value: +"`link`: the model read from."
    • changedInput schema / properties / source_uid / description
      Previous value: -"`link` only: uid of the source item in that model."New value: +"`link`: uid of the source item in that model."
    • changedInput schema / properties / summary / description
      Previous value: -"Required: short human-readable note (3–100 chars) summarising what this change does. Shown as the label in the model version history. Be specific (e.g. \"Renamed Revenue to Net Revenue\", \"Imported 2024 OPEX from Excel\")."New value: +"Short note (3–100 chars) describing the change, stored as the label of the resulting version. Examples: \"Renamed Revenue to Net Revenue\", \"Imported 2024 OPEX from Excel\"."
    • changedInput schema / properties / timeline_ref / description
      Previous value: -"`link` only: grain of the linked line (default: the source's grain when active here, else the finest active grain)."New value: +"`link`: grain of the linked line (default: the source's grain when active here, else the finest active grain)."
    • changedInput schema / properties / uid / description
      Previous value: -"`link` only: retarget this existing non-list assumption instead of creating one."New value: +"`link`: existing non-list assumption to retarget. `unlink`: the linked line to detach."
    • changedInput schema / properties / uids / description
      Previous value: -"`refresh` only: restrict to these linked items (default: all)."New value: +"`refresh`: restricts the refresh to these linked items (default: all)."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already mark this destructive and non-idempotent, and the description adds substantial context beyond them: read access to the source model is required, batch link is validated whole so one failure writes nothing, per-link refresh failures leave stored values intact, a pre-refresh state is auto-backed-up when values change, self-links are rejected, cycles resolve one hop per refresh, and one version labelled with `summary` persists.

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 purpose and op breakdown are front-loaded, and every clause — batch atomicity, backup, cycles, version persistence — carries operational weight. It is a dense single paragraph with heavy backtick/semicolon syntax that takes effort to parse, which costs it the top score.

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?

For a destructive, multi-mode mutation with 11 parameters, the description covers permissions, atomicity, failure handling, backup, edge cases, and side effects. The only return-value reference is `results` from a batch link, which is acceptable given no output schema exists and the main risk areas are covered.

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 100%, so the baseline would be 3, but the description adds real meaning: `uid` retargets an existing non-list assumption, `links` is an alternative batch form (one form per call, up to 200), and `values` are a snapshot projected to this model's grain with nulls outside source coverage. It does not spell out `timeline_ref` default logic beyond what the schema already says, so it stops short of 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?

States a specific verb set (link/refresh/unlink) operating on a specific resource (links from this model to items in other Layerz models) and defines each operation's effect. The Excel-linked-workbook analogy makes the concept concrete, and it is clearly distinguishable from siblings like layerz_manage_integration or layerz_manage_mapping.

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?

Each op has an explicit condition for use: `link` to create or retarget, `refresh` as 'the only way the values move', `unlink` to detach while keeping values. It also routes the agent elsewhere for a related need ('Link status and staleness: layerz_list_integrations { include_external_refs: true }') and flags that the tool is not advertised to read-only keys.

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