This guide covers agents that drive a browser tab, such as Chrome's built-in agent or Claude in Chrome. They work on the design you have open. To ask a chat assistant such as Claude or ChatGPT for a new model instead, see use TopoStack with AI assistants.
What WebMCP is
WebMCP lets a web page offer tools to an agent that is using the page. The agent does not have to find and click buttons. It calls the studio's own actions, with checked inputs, and reads back a clear result. The studio offers its tools only while it is open in a tab, and only to an agent working in that tab.
Turn it on
- WebMCP is experimental. In Chrome it is available from version 146, behind a flag or an origin trial. Look for WebMCP on
chrome://flags, or follow your agent's setup instructions. - Open the studio in the tab your agent controls. The studio registers its tools when it finds the browser's model context. There is nothing to switch on in TopoStack.
- The tools are not offered when the studio is embedded in another site, such as the Atomm platform.
The tools
Every tool name starts with topostack_, so it cannot be confused with another site's tools.
| Tool | What it does |
|---|---|
topostack_get_design | Reads the open design: place, size, layered or flat output, material, exaggeration or contour count, generation state, the studio's status, whether it can be exported, and the sheet count once generated. Changes nothing. |
topostack_search_places | Searches for a place by name and returns labels, coordinates and a suggested area. Changes nothing. |
topostack_set_area | Moves the design to a new area, either a center and ground width in kilometers or a bounding box, as choosing a search result does. The model is rebuilt with the next generate. |
topostack_update_design | Changes the size, shape, output, material thickness, vertical exaggeration, contour count, map details, title or laser settings. It takes the same fields and ranges as the project request, except the area and markers. Anything left out stays as it is. |
topostack_generate_preview | Loads terrain and builds the model, as the Generate button does, then reports the sheet count or the error. |
topostack_undo | Undoes the last change, as the Undo button does. |
topostack_open_export | Opens the Export dialog, and says so if export is blocked. |
What stays in your hands
- Every change an agent makes is an ordinary undo step, so Undo in the studio reverses it as it would reverse your own click.
- The agent can open the Export dialog but cannot download files. You choose the files and save them.
- Agents cannot edit markers, fonts, custom graphics, tracks or depth charts. They stay as you set them.
- Invalid values are refused with a message and leave the design unchanged, for example a material thickness outside 0.5–25 mm.
- Place names in search results come from a geocoder. The agent is told to treat them as names, not instructions.
A typical session
- Ask: “Make this a 250 mm circle of Crater Lake in 4 mm plywood and show me the layers.”
- The agent searches for the place, sets the area, and updates the shape, size and material thickness.
- It generates the preview and reports the sheet count.
- Check the 3D preview yourself. Adjust anything in the studio, or ask for more changes.
- When you are happy, ask the agent to open the export dialog, then download the files. See export files for what each download contains.
An agent can pick the wrong place or an impractical size. Check the map area, the layer count and the size before you cut, and cut one layer as a test.
For site and agent developers
The studio checks for document.modelContext, or the older navigator.modelContext, and calls registerTool once for each tool. The tools are removed when the studio closes. Each tool declares an input schema and read-only or non-destructive hints. Results carry a text summary, and topostack_get_design and topostack_generate_preview also carry structured content.
An agent that is not in the browser should use the remote MCP server instead. It plans models and returns a studio link that opens and generates them.