Skip to main content
Glama

Create or update branch

layerz_update_branch
Idempotent

Creates or updates a branch. With dataset_id, patches that branch's metadata (display_name, priority, source_hint, file_name, actuals_through). Without it, the branch named patch.display_name is updated when it exists and created otherwise, with no data source and no input rows (values are then written with layerz_patch { branch_id }). priority is rejected on the default branch. An explicit actuals_through pins the real/forecast cutover (actuals_through_locked: true: source syncs stop rewriting it); null resets it to auto. Returns { branch, created }. Persists one version labelled with summary. Not advertised to read-only keys.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patchYes
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.
dataset_idNoBranch to update. Absent: the branch named `patch.display_name` is updated when it exists, created otherwise.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / dataset_id / description
      Added value: +"Branch to update. Absent: the branch named `patch.display_name` is updated when it exists, created otherwise."
    • 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."
    • addedInput schema / properties / patch / properties / actuals_through / description
      Added value: +"Real/forecast cutover (YYYY-MM). A value pins it against source syncs; `null` resets it to auto."
    • 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 / required
      Previous value: -[
      -  "summary",
      -  "dataset_id",
      -  "patch"
      -]New value: +[
      +  "summary",
      +  "patch"
      +]
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that `priority` is rejected on the default branch, that an explicit `actuals_through` locks the cutover (`actuals_through_locked`), that this persists exactly one labelled version, that it returns `{ branch, created }`, and that it is hidden from read-only keys. These are real behavioral facts an agent needs that no annotation or schema field carries.

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?

Front-loads the create/update dichotomy and the two modes, then layers in constraints. Dense but mostly every sentence earns its place; the parenthetical about `layerz_patch` and the read-only-key note are informative rather than filler, though the passage is fairly packed.

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?

No output schema exists, yet the description states the return shape (`{ branch, created }`), covers the nested `patch` object behavior, auth scoping (read-only keys), and the default-branch constraint. Nothing material for correct invocation is 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 75% (only `actuals_through`, `summary`, `model_id`, and `dataset_id` are documented; `patch.file_name`/`source_hint`/`priority` are not). The description compensates by enumerating the patchable metadata fields and explaining the pinning/reset semantics of `actuals_through`, adding meaning beyond 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?

States a specific verb+resource ('Creates or updates a branch') and immediately splits the two distinct code paths (with vs. without `dataset_id`). The dual create/update semantics and the metadata-patch scope are clear enough that an agent can distinguish it from `layerz_import_branch` or `layerz_patch` 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?

Explicitly routes the agent: values are written with `layerz_patch { branch_id }`, so the agent knows this tool does not write rows. It also states the `priority` rejection on the default branch as a precondition. It stops short of explicitly comparing against siblings like import_branch/delete_branch, so no full when-not coverage.

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