You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
add an update_view to edit diagram created using create_view #29
create_view is super useful for creating diagrams but an additional tool for editing the diagrams would be super useful. Currently, a new view is created each time if we ask to make an edit.
@shaunak99
Hey! I'm working on this and plan to push a PR tomorrow.
The approach: a new update_view tool that takes a checkpointId (from a previous
create_view or update_view call) and elements (only the new/changed elements). The
server loads the base state from the checkpoint, applies deletes, merges new
elements, and saves a new checkpoint — so the model doesn't need to resend the entire
diagram.
One caveat: the MCP Apps SDK doesn't currently support updating an existing widget
instance in-place, so each update_view call will still render a new widget in the
chat. But the diagram state is properly carried over via checkpoints, and the model
only needs to send the delta — not the full element array.
Activity
breadoncee commentedon Mar 20, 2026
@shaunak99
Hey! I'm working on this and plan to push a PR tomorrow.
The approach: a new update_view tool that takes a checkpointId (from a previous
create_view or update_view call) and elements (only the new/changed elements). The
server loads the base state from the checkpoint, applies deletes, merges new
elements, and saves a new checkpoint — so the model doesn't need to resend the entire
diagram.
One caveat: the MCP Apps SDK doesn't currently support updating an existing widget
instance in-place, so each update_view call will still render a new widget in the
chat. But the diagram state is properly carried over via checkpoints, and the model
only needs to send the delta — not the full element array.
feat(mcp): add update_view tool for editing existing diagrams (excali…
breadoncee commentedon Mar 21, 2026
@shaunak99 Created a PR for this hopefully it'll be checked and merged