render_surface
Render an A2UI payload INSIDE the chat as a live interactive view (MCP Apps hosts only — on other hosts this returns the payload as text). No URL, no size ceiling, nothing stored: the payload travels in the tool result and renders in the a2ui_catalog_view. Accepts the blocks dialect or a v1.0 createSurface envelope (templates + dataModel decode in the view). Prefer this over preview_url when the host supports MCP Apps.
If the user names one of the Workspace's own pre-built views — Wall Builder, profile, history, links, composer — call open_workspace(view: ...) instead of composing one here yourself; those are wired demos with their own state, not something to reconstruct block by block. And never invent a generic block type (there is no "text" or "button" atom) — call get_catalog / get_atom_schema for the real vocabulary first; an unrecognised type is caught and replaced with a visible notice rather than silently dropped, but the block still won't render as intended.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"payload": "<payload>"
},
"name": "render_surface"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payload | Yes | The A2UI payload to render in the chat view: blocks dialect {title, theme, blocks:[...]} or a v1.0 createSurface envelope. |