Update an element
update_elementChange specific properties of an element in a Visual MCP scene. Move, resize, recolor, or rename elements without affecting the rest of the scene.
Instructions
Change properties of one element. Only the fields you send are touched; everything else in the scene stays exactly as it is.
USE THIS for every 'change that' request: move it, resize it, recolour it, rename its label, make a link dashed, add a caption to a connection. For a relative move like "a bit to the right", read the current position with get_scene and send the new value.
DO NOT call render_diagram again to change one thing. That throws away the scene id, the layout and everything the user already accepted.
id and type cannot be changed - remove and re-add the element if you truly need that.
Send null as a value to clear an optional property; for example { "x": null, "y": null }
hands the element back to the automatic layout.
Nothing is displayed until you call render_scene.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changes | Yes | Properties to set. Examples: { "x": 420 } to move, { "label": "PostgreSQL 16" } to rename, { "fill": "primary", "emphasis": "strong" } to highlight, { "dash": "dashed" } on a connection, { "width": 240, "height": 120 } to resize. null clears an optional property. | |
| sceneId | Yes | Id of the scene to work on, as returned by render_diagram or create_scene. | |
| elementId | Yes | Id of the element to change. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present only when success is false. | |
| element | No | The element after the change. | |
| sceneId | No | ||
| success | Yes | ||
| elementId | No |