Skip to main content
Glama

visualize_branch_tree

Read-only

Renders a design, preset, or feature branch tree as a Mermaid flowchart, showing branches, merges, cherry-picks, and undo history so you can inspect version lineage at a glance.

Instructions

Render a design / preset / feature branch tree as a Mermaid flowchart TD diagram.

Free door, tiered answer — Free: Branch · merge · cherry-pick · undo, on the designs you keep · Pro: Branch · merge · cherry-pick · undo, on every design · Business: ✓ · Enterprise: ✓.

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": {
      "artifact_id": "<artifact_id>"
    },
    "name": "visualize_branch_tree"
  }
}

Input Schema

NameRequiredDescriptionDefault
detailNo``"rich"`` (default) adds size, outcome and reference lines under each version's note. ``"simple"`` keeps the version and its note. ``"timeline"`` uses a horizontal ``flowchart LR`` layout — better for long single-branch histories. Default: "rich".
artifact_idYesThe id of the artifact whose branch tree you want rendered. For designs: the design_id. For presets: the preset_id. For features: the feature_id.
max_commitsNoTruncate to the newest N commits across all branches. Default 50 keeps diagrams readable inline. Pass 0 for no cap. Default: 50.
artifact_typeNoOne of ``"design"`` / ``"preset"`` / ``"feature"``. Selects which branch store to query. Default ``"design"``. Default: "design".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.5.1
    • addedInput schema / properties / artifact_id / description
      Added value: +"The id of the artifact whose branch tree you want rendered.  For designs: the design_id. For presets: the preset_id.  For features: the feature_id."
    • changedInput schema / properties / artifact_type / description
      Previous value: -"Default: \"design\"."New value: +"One of ``\"design\"`` / ``\"preset\"`` / ``\"feature\"``.  Selects which branch store to query.  Default ``\"design\"``. Default: \"design\"."
    • changedInput schema / properties / detail / description
      Previous value: -"Default: \"rich\"."New value: +"``\"rich\"`` (default) adds size, outcome and reference lines under each version's note. ``\"simple\"`` keeps the version and its note. ``\"timeline\"`` uses a horizontal ``flowchart LR`` layout — better for long single-branch histories. Default: \"rich\"."
    • changedInput schema / properties / max_commits / description
      Previous value: -"Default: 50."New value: +"Truncate to the newest N commits across all branches.  Default 50 keeps diagrams readable inline.  Pass 0 for no cap. Default: 50."
  2. Addedv1.5.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds one genuinely useful behavioral fact, the output is a Mermaid flowchart TD, plus a vague entitlement note about Free vs Pro access that is not clearly tied to this tool's behavior. Nothing is said about size limits, rendering cost, or what happens when the tree is large.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening sentence is tight and front-loaded with the core action and output format. The second sentence about Free/Pro/Business/Enterprise tiers is pricing boilerplate that does not help an agent decide or call the tool, and it consumes nearly half the description.

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?

With no output schema, the description usefully states the return artifact is a Mermaid flowchart TD, and all four parameters are fully covered by schema text. The remaining gap is the absence of guidance on the trade-off between the three detail modes or on truncation behavior when max_commits is large, but the definition is broadly sufficient to call correctly.

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 artifact_id, artifact_type, detail and max_commits are all already documented with defaults and enum-like values. The description only restates the three artifact kinds (design/preset/feature) in prose, adding no meaning beyond the schema, which is the expected baseline here.

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 first sentence gives a specific verb ('Render'), a precise resource ('design / preset / feature branch tree'), and the concrete output artifact ('Mermaid flowchart TD'), which distinguishes it from list-style siblings such as list_design_branches or show_branch_history. It stops short of naming any sibling it should be preferred over, so an agent still has to infer the boundary.

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

Usage Guidelines2/5

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

There is no explicit statement of when to use this tool versus alternatives like show_branch_history, compare_branches, or list_design_branches. The tier line hints that availability varies by plan, but it reads as marketing rather than actionable routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools