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