# Browser WebMCP

> Let an in-browser agent work with the open, unsaved canvas.

EXPERIMENTAL BROWSER CAPABILITY WebMCP lets an in-browser agent work with the open editor, including its unsaved design. It is separate from the remote MCP server and uses the current signed-in browser session.

**Feature detection, not a browser requirement** The editor detects `document.modelContext`, with `navigator.modelContext` as a legacy fallback. Open-document tools register while an editor is open; saved visual-inspection API tools also register in the signed-in workspace. Tools are cleaned up when their owning view changes or unmounts. Unsupported browsers retain the full workspace and network MCP.

## Open-document tools

| Tool | Input | Effect |
| --- | --- | --- |
| studio_get_brief | {} | Read the saved interview, answers, scope, and independent brief revision. |
| studio_update_brief | { expectedRevision, request?, interview?, answers?, scope? } | Persist a brief update, with revision zero for creation. Invalidates approval and opens the interview workspace. |
| studio_approve_brief | { expectedRevision } | Approve the current answered scope only after explicit human agreement. Does not generate or publish. |
| studio_inspect_design | {} | Read preflight hints for the current unsaved document. Does not change or save it; does not certify accessibility. |
| studio_get_design | {} | Read the current unsaved document and saved revision. |
| studio_update_node | { nodeId, patch } | Edit one existing node locally. Patch permits text, x, y, width, height, opacity, and rotation. Edits locally; live mode autosaves. |
| studio_set_design | { document } | Replace the local document after full validation. Keep the open project's ID and kind. Edits locally; live mode autosaves. |
| studio_save_design | {} | Save the current local document using the saved revision. Conflicts do not silently overwrite newer work. |

## 3D character authoring

`studio_scene_command` previews or applies mesh conversion, remesh, joint lofts, explicit quadruped/winged rigs, named joint limits, weights, IK, wing-flap/roar clips, expressions and UV paint. Discover `sceneCommands` with `studio_capabilities`. Preview defaults true; set it false to apply locally. `studio_inspect_scene` reads topology and sampled pose diagnostics. Native geometry needs no provider key.

Saved-state equivalents: REST GET/POST `/api/projects/:id/scene`, MCP `inspect_scene`/`author_scene`, and CLI `dsa scene inspect`/`dsa scene command`. Server commands require the observed revision; CLI previews unless `--apply` is supplied.

`studio_imported_model` takes `pageId` and `nodeId` for GLB inventory; `convert:true` previews editable conversion and `preview:false` applies. `studio_frame_scene_shot` takes `pageId`, `nodeIds`, optional `samples` (2–61, default 17) and portrait/square `aspect`; it previews by default. Network clients use existing document/operations and editable-scene export. See [3D characters](https://studio.datxanhmientrung.ai/docs/3d) for conversion limits, importedClips, lighting/effects, framing, sound and timed review exports.

## Inspect saved images

In the signed-in workspace and editor, `studio_api_post_projects_id_inspect` returns a page image or project contact sheet; `studio_api_post_projects_inspect` returns workspace covers. Both return actual PNG image blocks plus metadata. These API tools inspect saved content, so save and verify local changes first. They do not publish or invoke a provider. Follow `nextOffset` and actually view the images before claiming review.

```
{ "parameters": { "id": "PROJECT_ID" }, "body": { "mode": "page", "pageIndex": 0, "expectedRevision": 1 } }
```

Use the revision actually read. Workspace input needs only `body` with optional offset, limit, time and tileSize. Discover exact schemas before calling; unsupported browsers can use network MCP or CLI.

## Shared operations and authenticated API tools

Operation batches and document writes register compact input envelopes to fit browser host limits. Call `studio_capabilities` for the full nested schemas before writing. Execution still runs the canonical validators.

`studio_apply_operations` accepts the shared operation schema for structured layouts, components, pages, meshes and timelines. `studio_capabilities` returns current schemas and documented endpoints. Tools named `studio_api_…` operate on saved server state, including library CRUD/version/apply/insert, discovery, export and asset upload.

Pass path values in `parameters`, URL filters or pinned versions in `query`, and request payloads in `body`. For the asset-upload tool, pass `{ name, mimeType, base64 }` as body; it creates the real multipart file request. Uploading adds to the library without placing a node. Insert explicitly, or use shared `replace-asset` with observed `assetId` and `replacementId` to replace existing uses. Server ownership and revision checks still apply.

```
{ "query": { "q": "Roboto" } }
```

Discover exact tool names and request schemas from the browser registry or [live OpenAPI reference](https://studio.datxanhmientrung.ai/api/openapi); registration follows the documented API surface.

```
{
  "nodeId": "ACTUAL_NODE_ID",
  "patch": { "text": "A clearer headline", "x": 64 }
}
```

Read first, apply focused edits, and inspect the canvas. Save explicitly when live autosave is off; API tools always operate on saved server state. A browser agent does not receive provider secrets or permanent API keys through these tools. Check Settings → Agent access for the browser capability state.

[Open the editor](https://studio.datxanhmientrung.ai/)[Check agent connections](https://studio.datxanhmientrung.ai/?settings=agents)
