PixelWeaver v0.5.0 /server.src.pixelweaver.mcp_partset_tools
On this page

Part-set MCP tools to assign canvases to part-sets, pair index-locked siblings, create part families, and validate pairing completeness across a project.

#server.src.pixelweaver.mcp_partset_tools

#server.src.pixelweaver.mcp_partset_tools

Part-set MCP tools -- assign canvases to part-sets, pair index-locked siblings, create part families, and validate pairing completeness.

Server-side invariants live once in state.py (ProjectState.*); these handlers call them and surface hard errors as structured dicts. Mutating handlers follow the frame-tools sequence: validate -> mutate -> dispatch -> broadcast. Since the server keys canvases by name and has no ids, the frontend-facing command params carry names (state flows to clients via the full-state patch).

#_partset_undo_record

python
def _partset_undo_record(canvas_snapshots: list[tuple[Any, dict[str, Any]]]) -> dict[str, Any]

Build a canvas-scoped meta-snapshot record for part-set metadata changes.

canvas_snapshots is a list of (canvas, before_attrs) pairs; each attr that changed becomes a meta_snapshot change so MCP undo/redo revert the part-set/pairing state via the shared handler.

#register_partset_tools

python
def register_partset_tools(registry: MCPCommandRegistry) -> None

Register all part-set MCP tools.

Search