Skip to content

Accept Box in element_builder schema - #148

Draft
hernang87 wants to merge 1 commit into
mainfrom
claude/admiring-galileo-d9rtx1
Draft

hernang87 wants to merge 1 commit into
mainfrom
claude/admiring-galileo-d9rtx1

Conversation

@hernang87

Copy link
Copy Markdown

Why

The Designer Extensions API now exposes elementPresets.Box, and the public MCP in the monolith accepts element_builder type: "Box" (webflow/webflow#122058). This server still rejects it: DEElementSchema fails with Invalid option before the request is forwarded to the Designer.

This PR adds Box to the DEElementSchema enum. It also updates the model-facing text to match the monolith:

  • the type hint says to use Box for generic containers, that Section creates a Box with the section tag, and that Box elements come back as type Block;
  • rules.ts lists Box among the elements that can have children.

Dependency: don't merge yet

This server only validates element_schema, then forwards it over RPC to the Designer bridge app, which maps element types to presets. Until that app maps Box to elementPresets.Box, a Box request will pass validation here and then fail in the Designer. I haven't confirmed where the bridge app's mapping lives; it may be the designer-app in mcp-remote-cloudflare-server, which needs the same enum change.

Testing

  • npm run build and npx tsc --noEmit pass.
  • DEElementSchema.safeParse({type: "Box"}) succeeds and an unknown type still fails.
  • Not run: an end-to-end call against a Designer. Once the bridge app maps Box, element_builder with {type: "Box"} should create a Block with tag div.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CxAGfMvh2YLZpswVZtXLYE


Generated by Claude Code

Add Box to DEElementSchema so element_builder no longer rejects
type "Box" before the request reaches the Designer, and point the
model at Box for generic containers in the schema hint and rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CxAGfMvh2YLZpswVZtXLYE
@hernang87 hernang87 self-assigned this Oct 6, 2026

@gillevin-webflow gillevin-webflow left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as a schema change. Don't merge until Box is also mapped on the bridge side (mcp-remote-cloudflare-server: DEElementSchema, designer-app helper, headless-sdk spec).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants