Skip to main content
Glama

diagram_node

DestructiveIdempotent

Add, patch, or remove a single diagram step by specifying only the fields to change, leaving others intact. Build flows incrementally by adding steps before their edges.

Instructions

Add, patch or remove one step of a diagram.

Only the arguments you pass are touched, so patching a note leaves the label alone; pass note="" to clear one.

The whole-graph rules are relaxed here on purpose: a step may sit unattached until you add its edges, which is what lets a flow be built up across several calls. diagram() enforces them.

Input Schema

NameRequiredDescriptionDefault
keyYesthe step's id; a new key adds a step.
uidYesthe diagram.
noteNothe step's explanation: reasoning, caveats, history.
labelNowhat happens at the step, objectively.
shapeNostart|step|decision|io|end.
deleteNoremoves the step together with its edges and its memory links.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv0.16.1
    • addedInput schema / properties / delete / description
      Added value: +"removes the step together with its edges and its memory links."
    • removedInput schema / properties / delete / title
      Removed value: -"Delete"
    • addedInput schema / properties / key / description
      Added value: +"the step's id; a new key adds a step."
    • removedInput schema / properties / key / title
      Removed value: -"Key"
    • addedInput schema / properties / label / description
      Added value: +"what happens at the step, objectively."
    • removedInput schema / properties / label / title
      Removed value: -"Label"
    • addedInput schema / properties / note / description
      Added value: +"the step's explanation: reasoning, caveats, history."
    • removedInput schema / properties / note / title
      Removed value: -"Note"
    • addedInput schema / properties / shape / description
      Added value: +"start|step|decision|io|end."
    • removedInput schema / properties / shape / title
      Removed value: -"Shape"
    • addedInput schema / properties / uid / description
      Added value: +"the diagram."
    • removedInput schema / properties / uid / title
      Removed value: -"Uid"
    • removedInput schema / title
      Removed value: -"diagram_nodeArguments"
  2. Addedv0.1.1

TDQS

A4/5.0
Behavior4/5

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

Goes beyond the annotations by disclosing partial-update semantics ('only the arguments you pass are touched'), the empty-string clear convention, and the deliberate relaxation of whole-graph validation versus diagram(). It leaves the destructive scope to the schema's delete description rather than restating it, which is acceptable given destructiveHint=true already flags the risk.

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 action, then two short paragraphs that each carry distinct value (patch semantics, validation relaxation). Slightly longer than strictly necessary but no sentence is wasted.

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 all six parameters documented and annotations carrying the safety profile, the description supplies the remaining behavioral context an agent needs (partial updates, clearing, relaxed invariants). No output schema exists, so return-value disclosure is not required.

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 baseline is 3, but the description adds real meaning: merge-style patching and the note="" clear idiom are behaviors the schema alone does not convey. It does not cover the required uid/key semantics beyond what the schema states.

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 triad (add/patch/remove) and resource (one step of a diagram), which an agent can act on immediately. It implicitly separates 'step' from edge/link siblings but never names diagram_edge or diagram_link to sharpen 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 Guidelines4/5

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

It explains the intended usage pattern (build a flow up across several calls, leaving steps unattached until edges are added) and points at the alternative diagram() for whole-graph enforcement. No explicit 'when not to use' for the edge/link siblings, but the incremental-vs-atomic contrast is genuinely useful.

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