Skip to content

feat: node.update-props + project.list fix + MCP feature reference#157

Merged
field123 merged 4 commits into
masterfrom
fix/dynamic-value-feature-gap
Mar 4, 2026
Merged

feat: node.update-props + project.list fix + MCP feature reference#157
field123 merged 4 commits into
masterfrom
fix/dynamic-value-feature-gap

Conversation

@field123
Copy link
Copy Markdown
Collaborator

@field123 field123 commented Mar 4, 2026

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. Reuses setTplComponentArg from WAB TplMgr to mirror Studio behavior exactly. 13 test cases.
  • project.list fix: The MCP sent ?query=all but the server's parseQueryParams runs JSON.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

  • 1578 unit tests pass (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 targeting
  • project.list: URL assertion updated to verify JSON-encoded query param (%22all%22)
  • Manual verification: project.list against live Plasmic server no longer returns HTTP 500

field123 added 4 commits March 4, 2026 15:18
…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.
@field123 field123 merged commit 6bd84dc into master Mar 4, 2026
12 of 15 checks passed
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.

1 participant