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
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Diagram UUID | |
| title | No | Display name | |
| code | No | Mermaid source. Replaces the diagram's current code. | |
| style | No | Visual preset: midnight (default dark), paper, forest, ocean, mono. | |
| styleOptions | No | Optional 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. | |
| description | No | Overall 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. | |
| createVersion | No | If 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. | |
| versionLabel | No | Optional short label for the snapshot taken when createVersion is true (max 80 chars). | |
| folderId | No | Optional 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.) |