Skip to content

add an update_view to edit diagram created using create_view #29

Open

Description

@shaunak99

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.

Activity

  1. breadoncee commented on Mar 20, 2026

    @breadoncee

    @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.

  2. breadoncee commented on Mar 21, 2026

    @breadoncee

    @shaunak99 Created a PR for this hopefully it'll be checked and merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions