Skip to main content
Glama

update_diagram

Update a diagram's title, description, Mermaid source, visual style, layout options, or create a version snapshot before changes.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDiagram UUID
titleNoDisplay name
codeNoMermaid source. Replaces the diagram's current code.
styleNoVisual preset: midnight (default dark), paper, forest, ocean, mono.
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.
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.
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.
versionLabelNoOptional short label for the snapshot taken when createVersion is true (max 80 chars).
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.)
Behavior3/5

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

No annotations provided, so the description carries full burden. It discloses the need to keep class assignments when rewriting source, which adds transparency. However, it does not mention other behavioral traits like permissions, atomicity, or error scenarios.

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 concise sentences, front-loaded with the action and key fields. The second sentence adds critical guidance without fluff. Every word earns its place.

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?

No output schema, and the description does not explain return values or behavior during simultaneous updates. Given 9 parameters and nested objects, more context on versioning or error handling would improve completeness.

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?

All 9 parameters are described in the schema (100% coverage). The description adds value beyond schema for the code parameter by specifying to preserve class assignments, and provides an overall summary. Baseline is 3, extra guidance raises it to 4.

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?

The description clearly states it updates an existing diagram's title, description, mermaid source, visual style preset, and/or layout style options. It distinguishes from sibling tools like create_diagram and get_diagram by focusing on modification.

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

Usage Guidelines3/5

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

The description implies usage for updating existing diagrams but does not explicitly state when to use versus alternatives like create_diagram or when not to use. Guidance is inferred but not direct.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yenchieh/diagramzu-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server