Update Diagram
update_diagramUpdate an existing CodePic diagram. You can rename it, replace all nodes/edges, or add/remove individual nodes and edges. Requires API Key authentication.
When responding to the user, present the returned URL as a clickable markdown link (e.g. [Open in CodePic →](URL)) so the user can click it directly in their AI client (Cursor / Claude / etc.).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | New document name | |
| edges | No | Full replacement of all edges | |
| nodes | No | Full replacement of all nodes. If provided, replaces the entire canvas content. | |
| addEdges | No | Edges to add | |
| addNodes | No | Nodes to add (without replacing existing ones) | |
| documentId | Yes | Document ID to update (from a previous create call) | |
| removeEdgeIds | No | IDs of edges to remove | |
| removeNodeIds | No | IDs of nodes to remove | |
| backgroundColor | No | New canvas background color |