ui.viewport
Since next
Size the engine's surface in device pixels, 64 to 8192 a side, and lay the UI out at it: a screenshot matrix's resolution axis, on one engine.
dpr, the device-pixel ratio to lay out for, 0.25 to 8, is taken as given, never inferred; layout is width/dpr by height/dpr. Answers the applied scale block (viewport: the logical size), laid out already: ui.tree reads the new size.
| Title | Resize the surface |
| Mode | editor |
| Token cost | about 187 tokens (listed only when its toolset is enabled) |
| Toolset | ui |
Arguments
| Argument | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
agent | string | no | The name of the agent making the call, when several agents share one connection: each named agent is its own actor and plays its own game. Leave it out when there is one agent. | ||
dpr | number | no | |||
height | integer | yes | |||
width | integer | yes |
Example
An MCP tools/call with the required arguments (placeholders in angle brackets).
{
"name": "ui.viewport",
"arguments": {
"height": 64,
"width": 64
}
}