feat: node.update-props + project.list fix + MCP feature reference#157
Merged
Conversation
…oject.list fix - NODE-UPDATE-PROPS.md: spec for TplComponent instance prop updates with dynamic expression bindings, slot support, variant-specific props, and prop deletion - MCP-FEATURE-REFERENCE.md: spec for comprehensive developer reference covering all 8 tools and 104 actions - IMPLEMENTATION_PLAN.md: plan covering update-props feature, project.list JSON encoding bug fix, and feature reference doc
…wiring Add the ability to set/update prop values on TplComponent instances via MCP, closing the #1 feature gap blocking data-driven component wiring. Supports scalar props, dynamic expressions ($expr / {{expr}}), boolean/number literals, slot content (PlasmicElement), prop deletion (null), variant targeting, and fail-fast validation with merge semantics. Uses setTplComponentArg from TplMgr — the same mutation path Studio uses — to ensure full data model fidelity. This brings the MCP to 104 actions across 8 domain tools.
Add self-contained developer feature reference covering all 8 STRAP domain tools and 104 actions. Fix stale action counts in README.md (103→104, node 15→16 with update-props) and index.ts (99→104).
…yParams
The server's parseQueryParams (util.ts:189) runs JSON.parse() on every
query param value. The MCP client was sending ?query=all (bare string)
which causes JSON.parse("all") to throw SyntaxError → HTTP 500. The
official Plasmic browser client (client/api.ts:67) JSON.stringify()s all
values before appending them as query params.
Changed api-client.ts to send ?query=%22all%22 (URL-encoded "all" with
JSON quotes), matching the server's expected encoding.
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.
Summary
node.update-props: New action on the node tool to set/update prop values on TplComponent instances (component instances already placed in the tree). Supports scalar values, dynamic expression bindings ($ctx.params.orderId,{{$queries.cart.data.id}}), boolean/number literals, slot content (PlasmicElement), prop deletion (null), and variant targeting. ReusessetTplComponentArgfrom WAB TplMgr to mirror Studio behavior exactly. 13 test cases.project.listfix: The MCP sent?query=allbut the server'sparseQueryParamsrunsJSON.parse()on every query param value, expecting?query="all"(JSON-encoded). Fixed to match the official Plasmic client behavior.FEATURE_REFERENCE.md: Self-contained developer reference covering all 8 MCP tools and 104 actions, with concept explanations for each feature area.Test plan
cd packages/plasmic-mcp && npm run test:unit)node.update-props: 13 test cases covering scalar props, dynamic bindings ($expr, {{expr}}), boolean/number, prop deletion, slot rejection, non-slot rejection, TplTag rejection, invalid prop name, empty props, multi-prop merge, fail-fast atomicity, variant targetingproject.list: URL assertion updated to verify JSON-encoded query param (%22all%22)project.listagainst live Plasmic server no longer returns HTTP 500