Repository navigation
Replies: 1 comment
|
I've opened #21271 to address some of these The only dedicated tool I've added is |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What
A few changes to make nested entries easier to edit through MCP, especially for page builders with several levels (for us: Section > Column > Block, plus nested style entries).
What's hard today
To add a block in the middle of a column, the model has to read the column, collect every existing block ID, and send something like:
That's fine for one level, but adding a whole section means nesting that shape three or four levels deep. And if the model forgets an existing ID in
sortOrder, that block is deleted without an error. That's the part that worries us the most. Models are pretty good at "insert this here" and not so good at rebuilding a full list perfectly every time.Suggestions
Roughly in order of how much they'd help:
1. Make removals explicit. Leaving an existing ID out of
sortOrdershould either keep the entry or return an error, and deleting should need an explicit list, like"delete": [902]. MCP already treats Matrix input a bit differently from GraphQL (new entries get appended whensortOrderis left out), so this would fit in.2. Small tools for nested entries, so the model doesn't have to send the whole field:
Updating a single nested entry already seems to work with
elements_updateon its own ID, which is great.We realize moving between owners touches permissions on both, drafts, and site propagation, so a clear error when something can't move cleanly would be better than a partial move.
3. Return the IDs of new entries, e.g.
{"new:1": 1234}, so the model can keep working without reading everything again.4. A quick tree view. The new dot paths (
blocks.innerBlocks) are a good start. If the summaries also had the title or entry type name, and maybe a short text preview, the model could find its way around a big page in one call.5. Work inside drafts. All of the above should work on a draft of the owner, so bigger changes can be reviewed before they go live. Nested entries get new IDs in a draft, so the tools would need to make clear which IDs to use.
Background
We've built 1–3 as custom tools in a project module (
add_block,move_section,remove_blockand so on) for a few client sites, and it made a pretty big difference, fewer broken pages and much smaller payloads. We'd be happy to move to something native, especially to get draft support.All reactions