Skip to main content
Glama

Diff two versions

layerz_diff
Read-only

Returns the semantic diff between two revisions of a model: { from, to, diff: { items: [{ uid, displayName, status, fields? }], branches: [{ id, display_name, status?, items }], metadata: [...], summary: { added, removed, modified, branches } } }. items compares the base plan; branches lists, per branch, the overlay cells it records over the base (value / values / timeline_values, null where the base shows through) — a write under branch_id or an import on a branch appears there, not as a base change. from and to each take exactly one of revision_id, version_number or id; without to, the diff runs against the live model.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoNewer endpoint; omitted = the current live model.
fromYesOlder endpoint: exactly one of revision_id / version_number / id.
model_idNoTarget model UUID. Required for user-scoped API keys; validated against the bound model for model-scoped keys.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / properties / from / description
      Previous value: -"Older endpoint. Exactly one of revision_id / version_number / id."New value: +"Older endpoint: exactly one of revision_id / version_number / id."
    • changedInput schema / properties / from / properties / id / description
      Previous value: -"Raw model_versions row UUID (rare)."New value: +"Raw model_versions row UUID."
    • changedInput schema / properties / from / properties / revision_id / description
      Previous value: -"Content fingerprint (sha256:hex). Preferred — stable across DB renames."New value: +"Content fingerprint (sha256:hex), stable across DB renames."
    • 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 / to / description
      Previous value: -"Newer endpoint. Omit (or set to null) to diff against the current live model."New value: +"Newer endpoint; omitted = the current live model."
    • changedInput schema / properties / to / properties / id / description
      Previous value: -"Raw model_versions row UUID (rare)."New value: +"Raw model_versions row UUID."
    • changedInput schema / properties / to / properties / revision_id / description
      Previous value: -"Content fingerprint (sha256:hex). Preferred — stable across DB renames."New value: +"Content fingerprint (sha256:hex), stable across DB renames."
  2. First observed

TDQS

A3.9/5.0
Behavior5/5

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

With readOnlyHint/destructiveHint already covering the safety profile, the description goes well beyond them by disclosing the full return shape and, critically, the semantics of branch overlays ('a write under branch_id or an import on a branch appears there, not as a base change'). That distinction would otherwise cause an agent to misread the diff.

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?

It is front-loaded with the purpose and then the return contract, with no filler sentences. The inline shape dump is dense and verbose, but since no output schema exists it earns its place by carrying the return contract.

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 3-parameter, nested-object read tool with no output schema, the description adequately covers inputs and return structure, especially the branch-vs-base distinction. It omits any mention of the `model_id` scoping requirement for user-scoped keys, a minor gap given the schema documents it.

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 description coverage is 100%, so the schema already documents the `from`/`to`/`model_id` shapes and their UUID/revision semantics. The description largely restates these ('exactly one of revision_id / version_number / id', 'omitted = live model') rather than adding new syntax or format detail, so the baseline of 3 applies.

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?

The opening sentence names a specific verb and resource ('Returns the semantic diff between two revisions of a model'), so the operation is unambiguous. It never names or contrasts itself with a sibling such as layerz_history, so it stops short of full differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clarifies the default behavior ('without `to`, the diff runs against the live model'), which is useful selection context. However, it never says when to pick this tool over layerz_history or other read tools, and offers no exclusions or prerequisites.

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