Skip to main content

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​

NameTypeRequiredDescription
actionLiteral['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']yesEditor operation
tool_namestr | None—Tool name when setting active tool
tag_namestr | None—Tag name when adding and removing tags
layer_namestr | None—Layer name when adding and removing layers
wait_untilLiteral['scene_loaded', 'first_frame'] | None—Optional bounded readiness wait for play
timeout_secondsint—Play readiness observation budget in seconds; expiry does not stop Play Mode
job_idstr | None—Readiness job ID to poll or cancel. play with wait_until accepts a 32-character UUID to start or reuse a retained job.
widthint | None—Fixed Game View width; combined limit 16 megapixels
heightint | None—Fixed Game View height
aspect_ratiostr | None—Game View aspect ratio W:H, components at most 8192
presetstr | None—Unique preset label returned by get_game_view_size
restore_tokenstr | None—Token returned by set_game_view_size; retained for the latest 16 changes in this editor session
unity_instancestr | 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.

MCP arguments
{
"action": "get_game_view_size"
}