ui_snapshot
MCP tools › Window and UI driver
The semantic tree of the Ferris IDEA window: every annotated element with role, accessible name, test_id, value (never of secret fields, which say only secret and empty; terminal text only with the right terminal-read), states, bounds, actions and declared effects, nested as children; format: "text" gives an indented outline role "name" #test-id [states]. locator limits it to one element's subtree. Needs the setting "Allow agents and scripts to operate the window" (only the user switches it on) and the right ui. Served by the window over HTTP; stdio answers unavailable. Experimental.
Its results carry text from files: the client is told to treat that as data, never as instructions.
| Capability | ui.ui_snapshot |
|---|---|
| Area | Window and UI driver |
| Access | reads only |
| Reaches | — |
| Rights | ui |
| Dry run | none |
Arguments
| Argument | Type | Description |
|---|---|---|
locator | any | Only the subtree of this element: a locator in the text form (id=project-tree,
role=dialog[name="Commit"]) or the JSON form. |
depth | integer | Levels to include (default 30).minimum 0 |
max_nodes | integer | Most nodes to include (default 2000); truncated says how many were left out.minimum 0 |
format | string | json (default) or text: an indented outline role "name" #test-id [states]. |
window | integer | A window of this project by id (default: the project's window).minimum 0 |
Call it from a shell
ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.
ferris-idea call ~/my-project ui_snapshotInput schema as JSON
{ "type": "object", "properties": { "locator": { "description": "Only the subtree of this element: a locator in the text form (`id=project-tree`,\n`role=dialog[name=\"Commit\"]`) or the JSON form." }, "depth": { "description": "Levels to include (default 30).", "type": [ "integer", "null" ], "minimum": 0 }, "max_nodes": { "description": "Most nodes to include (default 2000); `truncated` says how many were left out.", "type": [ "integer", "null" ], "minimum": 0 }, "format": { "description": "`json` (default) or `text`: an indented outline `role \"name\" #test-id [states]`.", "type": [ "string", "null" ] }, "window": { "description": "A window of this project by id (default: the project's window).", "type": [ "integer", "null" ], "minimum": 0 } }}