Skip to main content
Glama

update_diagram

Update an existing diagram’s title, description, Mermaid source, visual preset, and layout. With proposal review on, creates a pending proposal and returns a review URL.

Instructions

Update an existing diagram's title, description, mermaid source, visual style preset, and/or layout style options. When rewriting the source, keep or restore class assignments using the role names from this server's instructions so the diagram stays color-grouped. In a workspace with proposal review enabled, your change is recorded as a proposal pending human approval rather than applied to the live diagram — in that case tell the user you've proposed the change and share the review URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDiagram UUID
codeNoMermaid source. Replaces the diagram's current code.
styleNoVisual preset: midnight (default dark), paper, forest, ocean, mono.
titleNoDisplay name
folderIdNoOptional UUID of an existing folder to move this diagram into. Use list_folders to look up folder ids. (Moving back to root is currently human-only.)
descriptionNoOverall purpose of the diagram (≤1000 chars). Shown to share-link viewers and surfaced back to the agent as the diagram's brief — write this before generating the code.
styleOptionsNoOptional layout knobs, independent of the color preset. Each key is optional; omit any to keep its default. Pass layout: 'auto' to let the server pick a concrete layout based on the diagram's shape.
versionLabelNoOptional short label for the snapshot taken when createVersion is true (max 80 chars).
createVersionNoIf true, snapshot the pre-update diagram state as a version row before applying the update. Use this to create a checkpoint right before an agent overwrites the diagram.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.0.4
    • addedInput schema / properties / code / description
      Added value: +"Mermaid source. Replaces the diagram's current code."
    • addedInput schema / properties / id / description
      Added value: +"Diagram UUID"
    • addedInput schema / properties / title / description
      Added value: +"Display name"
  2. First observedv0.0.3

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses a key behavioral trait: in proposal-enabled workspaces the change is a proposal and a review URL is shared. It also mentions class assignment preservation. However, it omits other important behaviors: what the tool returns (updated diagram or proposal URL), whether updates are fully overwriting or partial, and the semantics of createVersion/versionLabel (snapshotting). These gaps reduce transparency.

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?

The description is concise, starting with the purpose, then two important behavioral notes. It is front-loaded and each sentence adds value. It is not overly long and has no fluff, though it could be slightly tighter. A strong, efficient structure.

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?

With 9 parameters, a nested styleOptions object, and no output schema, the description covers the core update action and the proposal edge case, but it does not explain return values or the behavior of createVersion/versionLabel, which are significant for this mutation tool. The absence of output schema means the description should clarify what the agent can expect back, but it does not. This leaves the definition incomplete for an agent to fully understand the tool's behavior.

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 the schema documents all parameters. The description adds some value by specifying that when rewriting source, class assignments must be maintained, and it contextualizes the proposal workflow. However, it doesn't elaborate on individual parameters beyond what the schema provides. Baseline 3 is appropriate since the schema covers the semantics and the description offers only marginal additional meaning.

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 description clearly states the verb 'Update' and the resource 'existing diagram', and lists the editable fields (title, description, mermaid source, visual style preset, layout style options). It is specific and distinguishable from sibling tools like create_diagram, though it doesn't explicitly differentiate itself from update_deck. No explicit sibling naming, but the purpose is unambiguous.

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?

The description provides conditional usage guidance: it instructs to keep or restore class assignments when rewriting source, and explains that in a proposal-review workspace the change is recorded as a proposal rather than applied live, requiring the agent to inform the user and share the review URL. It does not name alternatives, but as it is the only tool for updating diagrams, the context is clear and sufficient.

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