feat(de-components): add per-instance property override actions#127
Open
shaynelarocque wants to merge 1 commit intowebflow:mainfrom
Open
feat(de-components): add per-instance property override actions#127shaynelarocque wants to merge 1 commit intowebflow:mainfrom
shaynelarocque wants to merge 1 commit intowebflow:mainfrom
Conversation
Adds three actions to de_component_tool that wrap the Designer SDK's per-instance prop APIs on ComponentElement: - set_component_instance_props -> setProps - get_component_instance_props -> getProps / getResolvedProps - reset_component_instance_props -> resetAllProps Unblocks populating text on component instances (Heading text, Button label, Rich Text content) which element_tool.set_text cannot reach and Data API update_static_content rejects for the primary locale. Refs webflow#96.
tterb
approved these changes
Apr 27, 2026
tterb
left a comment
There was a problem hiding this comment.
These changes look good to me, but it might be worth getting a quick check from @memo-pineda since he has a lot more MCP context 👍
Comment on lines
+255
to
+256
| value: z | ||
| .any() |
There was a problem hiding this comment.
I think z.any() allows undefined, functions, ect... Is that the behavior that we want or would something like this be better here?
z.union([
z.string(), z.number(), z.boolean(), z.null(),
z.record(z.unknown()),
])
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #96.
What
Adds three actions to the existing
de_component_tool, mirroring the Designer SDK's per-instance prop APIs onComponentElement:set_component_instance_propssetProps(entries)get_component_instance_propsgetProps()/getResolvedProps()(viaresolved: true)reset_component_instance_propsresetAllProps()Schema
Example
{ "name": "de_component_tool", "arguments": { "siteId": "…", "actions": [{ "set_component_instance_props": { "id": { "component": "c_123", "element": "e_456" }, "overrides": [{ "prop_id": "Text", "value": "Hello from MCP" }] } }] } }The MCP server is a generic RPC forwarder (
src/modules/designerAppBridge.ts). These actions are emitted verbatim over the socket to the Webflow MCP Bridge App, which needs a matching handler mapping each action to the SDK call. This PR ships the MCP-side schema only — a companion Bridge-App change is required for#96to actually close.I intentionally used
Refs #96rather thanCloses #96for that reason.Testing
npm run buildclean (before and after).npx tsc --noEmitclean.nullreset-per-prop, empty-overrides rejected,resolved: true, reset-only action, empty-action rejected.Files
src/tools/deComponents.ts— three new action keys onde_component_tool, refine guard updated.src/tools/rules.ts— three guidance lines added towebflow_guide_tool.