Skip to content

Let the MCP tools move a media block inside a section #720

Closed

Description

@HMarzban

What happened

In 📜 What the history holds on /demo, the picture sits after the "Show the whole document" footer. The restyled docs/DEMO.md puts it after the bullet about the newest 50 versions. The MCP tools cannot move it: edit_blocks cannot remove a media block, so it cannot re-insert one either.

The fix on the live page was to move the text around the picture instead. That works only when no two media blocks need to swap places.

Ask

Give the MCP tools a safe way to move one media block inside a section, for example move_block(section_id, rev, from, after_block). It must keep the node and its attributes, and refuse a move across a heading.

Notes

  • A picture's caption lives in the same block as the picture, so a caption can change only through replace_text. That worked on 2026-11-09.

Activity

  1. added this to the v2.4.0 milestone on Nov 9, 2026
  2. HMarzban commented on Nov 9, 2026

    @HMarzban
    CollaboratorAuthor

    Maintainer ruling, 2026-11-09

    Add a new MCP tool, move_block. It moves one block inside one section, after a numbered block, and keeps the node and all its attributes. It never crosses a heading, and it checks the section rev like the other edit tools. It is a new tool name, not a new field on edit_blocks, as the hop rules in apps/hocuspocus.server/CLAUDE.md require.

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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions