When an AI Agent Gets a Hand on the Model

An AI agent changing a building is not useful merely because it can emit JSON or call a server. In Pascal Editor, the important question is whether agent control reaches the same semantic scene graph used by the human editor, and whether the result carries enough evidence to be trusted. This chapter explains how Pascal's MCP layer—Model Context Protocol—connects an agent to the real core store, why it offers both architectural tools and a lower-level patch surface, and how validation, collision checks, and image-based input limit the claims an agent can make.

A good test case is a small home. The agent needs to create a story shell, add rooms, place doors and windows, furnish the rooms, and perhaps add a stair or roof. If every step requires hand-writing raw node objects, the agent must recreate ownership, defaults, coordinates, and ordering rules that Pascal already knows. If the protocol hides all of those rules behind an opaque “generate building” command, the result may be convenient but difficult to inspect. Pascal's MCP design sits between those extremes.

The bridge is the point, not a second model

The MCP package uses a headless SceneBridge over the actual core Zustand store. That choice is the foundation of the agent surface. The bridge can load a default scene, read nodes and ancestry, create and update nodes, apply patches, undo and redo changes, export graph data, and validate the graph. The same semantic node types and store mutation paths are used by the browser editor.

This reuse matters for more than code sharing. A separate AI scene model would need its own definition of a level, wall, door, room, material, and parent relationship. It would then need a translation step before the browser could display the result, creating a second place where IDs, defaults, migrations, and ownership could diverge. With the bridge, an agent's wall is still a Pascal wall. A door created by an agent is still attached to a wall in the graph, not merely placed near a line in a generated image.

The bridge is intentionally headless. It has no browser, WebGPU context, React renderer, or live Three.js object registry. The core store can still perform the semantic mutation and expose validation results, but no renderer consumes the resulting dirty marks in that process. This is a productive limitation: the agent can work with the model without pretending that graph mutation and visual rendering are the same operation.

The MCP server adds a protocol boundary around that bridge through a shared operations facade. When storage is available, the same facade also exposes scene lifecycle operations. The server can normalize tool schemas for clients that expect the JSON Schema 2020-12 dialect, but schema normalization does not change what a tool means. The protocol makes capabilities discoverable; the graph and its rules remain the authority.

Four layers of agent interaction

Pascal's MCP surface has four distinct layers. Resources orient the agent with current scene data, summaries, constraints, catalogs, and an agent guide. Prompts provide reusable workflows for turning a brief into tool calls, iterating on feedback, or planning a renovation from photos. Tools perform queries or mutations. Vision tools are an optional path that asks the MCP host to sample an image and return structured observations.

The distinction prevents a common protocol mistake: treating every callable thing as an action. A resource can describe a scene without changing it. A prompt can recommend a sequence without executing it. A read-only query can report walls or zones. A semantic construction tool can create a room.