Skip to main content
Glama

Read model snapshot

layerz_read
Read-onlyIdempotent

Returns a UID-native snapshot of a model: model (name, timelines, lists, branches), items (flat, parent_uid carries the hierarchy, each with role, formula, check, note; values are the base plan) and revision_id / version_number. Filters: uids, roles, include_children. with_values: true adds the computed series v aligned with the periods p (periods for explicit labels of mixed grains, else granularity), variance adds vv, per_element adds ve for list-mode items, health adds the check report, branch_id computes v and health under one branch's [base, branch] checkout, else they are the base plan. The check report is judged on a branch checkout: without branch_id, a multi-branch model reports the branch it opens on (health.branch_id) and every branch under health.by_branch. When the response leads with computable: false, errors[] names the broken dependencies (e.g. CIRCULAR_DEPENDENCY) and every series is a zero-filled placeholder. A read without uids or roles also carries conventions (workspace conventions + model FINANCE.md, as in layerz_get_conventions) when either is set, and guidance (the rebuild method of the modeling guide § 12) on a model of 1000 items or more.

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_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
uidsNoFilter by items: UIDs or names
rolesNoFilter by role
healthNoAlso returns the `health` block: non-blocking check violations (lines flagged `check`), evaluated at the finest active grain under a branch checkout: the `branch_id` requested, else on a multi-branch model the branch the model opens on (`health.branch_id`) with every branch's verdict under `health.by_branch`. `with_values: true` already includes `health` when the model has checks; this flag returns `health` without the full value series.
periodsNoPeriod labels to scope values to
model_idNoTarget model UUID. Required for user-scoped API keys; validated against the bound model for model-scoped keys.
varianceNoAlso return the variance series `vv` (the `branch_id` checkout − the base plan), aligned with `v`. Requires with_values and branch_id.
branch_idNoBranch whose `[base, branch]` checkout the values `v` and the check report `health` are computed under. Absent: the base plan. An unknown id is rejected. Requires with_values or health.
granularityNoGrain for `v`/`p` when no explicit `periods` are given, among the active timelines (another one: `GRANULARITY_UNAVAILABLE`). 'native' = finest active dated grain (monthly>quarterly>yearly). Default: 'yearly' when the model has it, else 'native'. Ignored when `periods` are provided (each label resolves its own grain).
per_elementNoAlso return `ve`: per-element series for list-mode items, keyed `ve[itemUid][elementLabel]` and aligned with `p` (e.g. payroll split by Business Unit). Without it, `v` only carries the aggregate. Requires with_values.
with_valuesNoCompute and return values for matched items
include_listsNoWhich named lists to embed in `model.lists`: 'referenced' (default — only lists used by the returned items via liste_ref), 'all', or 'none'.
include_childrenNoInclude descendants of filtered containers

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / granularity / description
      Previous value: -"Grain for `v`/`p` when no explicit `periods` are given. 'native' = finest active dated grain (monthly>quarterly>yearly). Default: 'yearly'. Ignored when `periods` are provided (each label resolves its own grain)."New value: +"Grain for `v`/`p` when no explicit `periods` are given, among the active timelines (another one: `GRANULARITY_UNAVAILABLE`). 'native' = finest active dated grain (monthly>quarterly>yearly). Default: 'yearly' when the model has it, else 'native'. Ignored when `periods` are provided (each label resolves its own grain)."
    • changedInput schema / properties / uids / description
      Previous value: -"Filter by item UIDs"New value: +"Filter by items: UIDs or names"
  2. Changed3 schema fields changed
    • changedInput schema / properties / branch_id / description
      Previous value: -"Branch whose `[base, branch]` checkout the values `v` and the check report `health` are computed under, instead of the stacked-all view (base-vs-overlay audit); `default` = the base plan alone. An unknown id is rejected. Requires with_values or health."New value: +"Branch whose `[base, branch]` checkout the values `v` and the check report `health` are computed under. Absent: the base plan. An unknown id is rejected. Requires with_values or health."
    • changedInput schema / properties / health / description
      Previous value: -"Also returns the `health` block: non-blocking check violations (lines flagged `check`), evaluated at the finest active grain under a branch checkout rather than the stacked view: the `branch_id` requested, else on a multi-branch model the branch the model opens on (`health.branch_id`) with every branch's verdict under `health.by_branch`. `with_values: true` already includes `health` when the model has checks; this flag returns `health` without the full value series."New value: +"Also returns the `health` block: non-blocking check violations (lines flagged `check`), evaluated at the finest active grain under a branch checkout: the `branch_id` requested, else on a multi-branch model the branch the model opens on (`health.branch_id`) with every branch's verdict under `health.by_branch`. `with_values: true` already includes `health` when the model has checks; this flag returns `health` without the full value series."
    • changedInput schema / properties / variance / description
      Previous value: -"Also return the variance series `vv` (stacked-all view − base baseline), aligned with `v`. Requires with_values."New value: +"Also return the variance series `vv` (the `branch_id` checkout − the base plan), aligned with `v`. Requires with_values and branch_id."
  3. Changed2 schema fields changed
    • changedInput schema / properties / branch_id / description
      Previous value: -"Branch whose `[base, branch]` checkout the values are computed under, instead of the stacked-all view (base-vs-overlay audit); `default` = the base plan alone. Requires with_values."New value: +"Branch whose `[base, branch]` checkout the values `v` and the check report `health` are computed under, instead of the stacked-all view (base-vs-overlay audit); `default` = the base plan alone. An unknown id is rejected. Requires with_values or health."
    • changedInput schema / properties / health / description
      Previous value: -"Also returns the `health` block: non-blocking check violations (lines flagged `check`), evaluated at the finest active grain. `with_values: true` already includes `health` when the model has checks; this flag returns `health` without the full value series."New value: +"Also returns the `health` block: non-blocking check violations (lines flagged `check`), evaluated at the finest active grain under a branch checkout rather than the stacked view: the `branch_id` requested, else on a multi-branch model the branch the model opens on (`health.branch_id`) with every branch's verdict under `health.by_branch`. `with_values: true` already includes `health` when the model has checks; this flag returns `health` without the full value series."
  4. Changed3 schema fields changed
    • changedInput schema / properties / branch_id / description
      Previous value: -"Compute values under a single branch's `[base, branch]` checkout instead of the stacked-all view — lets you audit base-vs-overlay (e.g. confirm the budget on the base, or what one branch changed). Pass `default` for the base plan alone. Requires with_values."New value: +"Branch whose `[base, branch]` checkout the values are computed under, instead of the stacked-all view (base-vs-overlay audit); `default` = the base plan alone. Requires with_values."
    • changedInput schema / properties / health / description
      Previous value: -"Also return the `health` block: non-blocking check violations (lines flagged `check`). Checks are evaluated at the finest active grain. `with_values: true` already includes `health` when the model has checks; set this to get `health` without the full value series."New value: +"Also returns the `health` block: non-blocking check violations (lines flagged `check`), evaluated at the finest active grain. `with_values: true` already includes `health` when the model has checks; this flag returns `health` without the full value series."
    • 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."
  5. Changed1 schema field changed
    • changedInput schema / properties / health / description
      Previous value: -"Also return the `health` block: non-blocking business-monitor violations. Monitors are evaluated at the finest active grain. `with_values: true` already includes `health` when the model has monitors; set this to get `health` without the full value series."New value: +"Also return the `health` block: non-blocking check violations (lines flagged `check`). Checks are evaluated at the finest active grain. `with_values: true` already includes `health` when the model has checks; set this to get `health` without the full value series."
  6. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare the safe read profile, yet the description goes well beyond them: it discloses the `computable: false` failure mode with `errors[]` naming broken dependencies such as `CIRCULAR_DEPENDENCY` and zero-filled placeholders, the branch-checkout semantics of the check report, and the conditions under which `conventions` and `guidance` blocks appear. This is exactly the behavior-level 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?

Core return shape is front-loaded and every clause carries information, with no filler. The downside is that it is a single dense run-on paragraph mixing return structure, flag semantics, and failure modes, which makes it harder to scan than a structured breakdown 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 12 optional parameters, no output schema, and no required fields, the description does the heavy lifting: it specifies return blocks, the meaning of every major output key, conditional extras, and the degraded-response case. An agent could call this correctly without opening the schema.

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 per-parameter baseline is already met, but the description adds a composition model the schema does not: it maps each flag to the output keys it produces (`v`/`p`, `vv`, `ve`, `health`) and explains how `periods` overrides `granularity` and how `with_values`/`branch_id` gate the other flags. It largely restates schema detail, which keeps it from a 5.

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 description opens with a specific verb and resource ("Returns a UID-native snapshot of a model") and enumerates the returned blocks precisely: `model`, `items`, `revision_id`/`version_number`. It never distinguishes this from `layerz_get_model` or `layerz_get_conventions` beyond a passing reference, so an agent still has to infer which read tool is canonical.

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?

Conditional guidance is embedded throughout (use `with_values` for computed series, `health` for checks alone, `branch_id` for branch checkout, `variance`/`per_element` for extra series), which implies when to enable each flag. However, there is no explicit when-to-use-this-instead-of-a-sibling routing or exclusion, and the `layerz_get_conventions` reference is descriptive, not directive.

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