Skip to main content
Glama

diagram_replace

Replace the whole diagram with Mermaid or draw.io XML, loading it into the live canvas and applying draw.io layout. Avoid tedious geometry edits by swapping entire structures at once.

Instructions

Replace the whole diagram with Mermaid or draw.io XML. Loads into the live canvas and lets draw.io layout. Prefer this over many tiny geometry edits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNo
layoutNodraw.io layout preset. Defaults to verticalFlow for Mermaid, none for XML.
contentYesMermaid source or draw.io / mxfile XML

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It does disclose a destructive side effect ('Replace the whole diagram'), a live-canvas load, and layout application. It does not mention reversibility, whether existing unsaved edits are destroyed, or whether the operation can be undone — for a destructive whole-replacement tool this is a notable gap.

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

Conciseness5/5

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

Two sentences with zero waste: the primary action is front-loaded, then a behavioral note, then a usage preference. Every sentence contributes distinct information.

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

Completeness2/5

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

No annotations, no output schema, and no mention of return values, failure modes, or the destructive consequence of wiping the existing diagram before a snapshot is taken. For a whole-diagram replacement tool, important operational context is missing — an agent could destroy work without being warned to snapshot first.

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 67%, and the schema already describes layout and content; format is defined via enum. The description adds context that format maps to Mermaid vs draw.io XML and that layout is applied by draw.io, but does not meaningfully enrich individual parameter understanding 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 ('Replace'), resource ('whole diagram'), and accepted formats ('Mermaid or draw.io XML'). The phrase 'whole diagram' clearly distinguishes it from the sibling diagram_patch, which implies partial edits.

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 guidance to prefer this over many tiny geometry edits, implicitly routing agents away from diagram_patch. However, it does not explicitly name the alternative tool nor state conditions like when to use diagram_patch or when a snapshot/restore workflow is advisable.

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