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.

Input Schema

TableJSON 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.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and openWorldHint=false, but the description adds substantial non-obvious behavior: batch validation is all-or-nothing (one failure writes nothing), per-link refresh failures leave stored values intact, values are auto-backed-up before a refresh that changes them, self-links are rejected, cycles resolve one hop per refresh, and it persists a version labelled with `summary`. This is exactly the kind of context annotations cannot carry.

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?

One dense paragraph, front-loaded with the tool's purpose and the op enumeration before details. It is long, and the per-op clauses are packed tightly with backticked field names, but nearly every clause conveys distinct operational behavior rather than filler.

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 multi-op, destructive, 11-parameter tool with no output schema, the description covers effect, failure modes, limits, versioning, and access scoping (not advertised to read-only keys), and even notes that link returns `results`. Nothing an agent needs to invoke it correctly appears missing.

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 is 3, but the description goes further than the schema by explaining that uid retargets an existing assumption on link, that refresh uids restrict scope, that links is a batch form of the flat fields capped at 200, and that null values mean outside the source's coverage. Only the required-summary and model_id scoping details are left to the schema.

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 names the specific resource (links from this model to items of other Layerz models) and the three operations (`link`, `refresh`, `unlink`), each with a concrete effect. An agent can distinguish this from siblings like layerz_manage_integration or layerz_dependencies without opening the schema.

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?

Each op carries its own usage context (link creates/retargets, refresh is the only way values move, unlink detaches but keeps values), and it routes the agent to layerz_list_integrations { include_external_refs: true } for status/staleness. It stops short of naming when NOT to use this tool versus other link/integration-management siblings.

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