Skip to main content
Glama

tree_diagram

Renders an indented outline as a node-link tree with centered parents and box-drawing connectors, for org charts, taxonomies, and dependency or lineage trees.

Instructions

Draw a hierarchy as a tree — the branching counterpart to block_diagram (which is a linear chain). Give it an indented tree outline (each deeper indent is a child) and it renders a real node-link tree: parents centered above their children, joined by box-drawing connectors. Great for a taxonomy, an org chart, a dependency or model-lineage tree. layout: "down" is the centered tree; layout: "list" is the file-tree ( |-- / -- ) form. boxed` wraps each node in a box.

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": {
      "tree": "<tree>"
    },
    "name": "tree_diagram"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
treeYesIndented outline; each deeper indent level is a child. E.g. 'Claude\n Opus\n Sonnet\n Haiku'.
boxedNoWrap each node in a box (down layout only).
gap_xNoColumns between sibling subtrees (down layout).
styleNoConnector charset: unicode box-drawing or portable 7-bit ascii.unicode
titleNoOptional heading centered above the tree.
layoutNodown: centered node-link tree. list: left-aligned file-tree.down

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It does a good job describing the rendered result (parents centered above children, box-drawing connectors, file-tree form, boxed nodes), but says nothing about how it interacts with the canvas: whether it draws at x/y, whether it overwrites existing content, or whether the canvas must exist first. That is a meaningful gap for a mutation-style drawing tool.

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-loaded with the core verb and the sibling contrast, then progressive detail on layouts and options. Every sentence carries information, though the use-case list and the two back-to-back layout sentences could be tightened slightly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter tool with no annotations and no output schema, the description covers the core rendering behavior but omits positioning semantics (x, y, gap_x) and any statement about canvas state or side effects. Adequate for construction, incomplete for safe invocation.

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 coverage is 75%, so the baseline is 3. The description adds real meaning for `tree` (each deeper indent is a child) and for `layout`/`boxed`, but leaves gap_x, style, title, x and y entirely to the schema, with x/y placement never explained in prose.

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 and resource (draw a hierarchy as a tree) and immediately distinguishes it from the sibling block_diagram as the 'branching counterpart' to its 'linear chain'. An agent can pick between them without opening either 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?

Gives explicit when-to-use framing: taxonomy, org chart, dependency or model-lineage trees, plus the contrast with block_diagram and a note on which layout fits which case. There is no explicit when-not-to-use or prerequisite (e.g. canvas required) statement, so it falls short of a 5.

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