manage_editor
Auto-generated from the Python tool registry. Do not hand-edit outside
<!-- examples:start --><!-- examples:end -->blocks — the generator (tools/generate_docs_reference.py) will overwrite them.
Group: core · Module: services.tools.manage_editor
Maturity: stable (support status; independent of enabled state, readiness and permissions).
Description
Controls Unity editor state and settings. The read-only tool get_game_view_size reads render_size in pixels and current_size from an open Game View in the selected Editor. Resource clients can read mcpforunity://editor/game-view-size. Default play/stop acknowledge requests: data.status is pending until a stable target is already observed; success alone does not confirm entry/exit. Observe mcpforunity://editor/state. play optionally waits for scene_loaded or first_frame with a bounded persisted job. first_frame confirms simulation frame progress, not rendered pixels or application async initialization. get_play_mode_job polls; cancel_play_mode_job cancels monitoring without stopping Play Mode. set_game_view_size selects fixed width/height, aspect_ratio W:H, or a preset label; restore_game_view_size uses the returned restore_token. Screenshots do not mutate Game View size. pause toggles pause/resume. Also supports telemetry_status, telemetry_ping, set_active_tool, add_tag, remove_tag, add_layer, remove_layer, deploy_package, restore_package, undo, redo. For prefab stages use manage_prefabs.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | Literal['telemetry_status', 'telemetry_ping', 'play', 'pause', 'stop', 'set_active_tool', 'add_tag', 'remove_tag', 'add_layer', 'remove_layer', 'deploy_package', 'restore_package', 'undo', 'redo', 'get_play_mode_job', 'cancel_play_mode_job', 'get_game_view_size', 'set_game_view_size', 'restore_game_view_size'] | yes | Editor operation |
tool_name | str | None | — | Tool name when setting active tool |
tag_name | str | None | — | Tag name when adding and removing tags |
layer_name | str | None | — | Layer name when adding and removing layers |
wait_until | Literal['scene_loaded', 'first_frame'] | None | — | Optional bounded readiness wait for play |
timeout_seconds | int | — | Play readiness observation budget in seconds; expiry does not stop Play Mode |
job_id | str | None | — | Readiness job ID to poll or cancel. play with wait_until accepts a 32-character UUID to start or reuse a retained job. |
width | int | None | — | Fixed Game View width; combined limit 16 megapixels |
height | int | None | — | Fixed Game View height |
aspect_ratio | str | None | — | Game View aspect ratio W:H, components at most 8192 |
preset | str | None | — | Unique preset label returned by get_game_view_size |
restore_token | str | None | — | Token returned by set_game_view_size; retained for the latest 16 changes in this editor session |
unity_instance | str | int | None | — | Target Unity instance for this call: Name@hash or hash prefix; an integer selects only that exact port over stdio and is rejected over HTTP. Read mcpforunity://instances for available targets. Omit to use the legacy active selection or the sole available instance. |
Returns
A dict containing the Unity response. The exact shape depends on the action.
Examples
Read the current Game view size before changing it for an Editor capture.
{
"action": "get_game_view_size"
}