Updated
On this page
Frame tools for MCP registry.
#server.src.pixelweaver.mcp_frame_tools
#server.src.pixelweaver.mcp_frame_tools
Frame tools for MCP registry.
Provides real server-side state mutations for animation frame operations, plus read-only introspection tools. Each mutation handler: 1. Validates the active project/canvas 2. Mutates CanvasState.frames directly 3. Dispatches the command to WebSocket clients (frontend undo stack) 4. Broadcasts a full state patch so all clients see the change
#_get_canvas
python
def _get_canvas(registry: MCPCommandRegistry) -> AnyReturn the first canvas of the active project, or an error dict.
#_broadcast_state
python
async def _broadcast_state(registry: MCPCommandRegistry) -> NoneBroadcast a full state patch to all WebSocket clients.
Thin wrapper over the hoisted registry method (kept so the existing frame tool call sites stay unchanged).
#register_frame_tools
python
def register_frame_tools(registry: MCPCommandRegistry) -> NoneRegister all frame/animation-related MCP tools.