Skip to content

Editor

108 tools for the editor itself: actors (spawn, select, copy, transform, delete), levels, saving, undo and transactions, Python, console commands and CVars, tests, enums and structs, screenshots, logs, media, and asset housekeeping (delete, export, migrate, consolidate, redirectors, unused and duplicate assets).

Back to the index.

add_component_to_actor

Additive

Attach a new component of any class to one actor already placed in the editor world, as an instance component in one undo step; the actor's Blueprint is not changed. Pick it for a single placed actor; add_component_to_blueprint changes the Blueprint so every instance gets it, and a typed add_*_component tool (add_spline_component, add_camera_component...) also sets that class's fields. Each call adds another component, so a retry makes a duplicate; with idempotent=true an existing component of that class is returned instead (already_existed true). The reply's object_path feeds set_properties and call_function; component_name, suffixed when the name is taken, feeds remove_component_from_actor, the inverse. An unknown actor or a class that is not an actor component is an error. It dirties the actor's package; save_level keeps it.

Parameter Type Required Description
actor_name string yes Internal object name (not the label) of the placed actor in the editor world, e.g. 'StaticMeshActor_3'.
component_type string yes Component class by name or path, with or without the U prefix or the Component suffix, e.g. 'StaticMeshComponent', 'Box' or '/Script/Engine.PointLightComponent'.
component_name string yes Name for the new component, e.g. 'TriggerBox'; a taken name gets a unique variant, reported back in component_name.
location array no Optional [x, y, z] relative location (for scene components)
rotation array no Optional [pitch, yaw, roll] relative rotation (for scene components)
scale array no Optional [x, y, z] relative scale (for scene components)
idempotent boolean no Optional bool (default false). When true, if the actor already has a component of this class, return it instead of adding a duplicate (already_existed:true). Use for single-instance components.

Returns: { actor_name: string, component_name: string, object_path: string, requested_component_name: string, component_type: string, already_existed: bool, success: bool }

add_enum_entry

Additive Idempotent

Append one enumerator to a Blueprint Enum (UUserDefinedEnum) and give it a display name. Idempotent (an entry whose display/internal name already exists reports already_existed with added=false, leaving the enum unchanged -- the engine itself does NOT dedup). The new entry lands at the end, before the hidden _MAX sentinel.

Parameter Type Required Description
enum_path string yes Full asset path of the UUserDefinedEnum (e.g. /Game/Blueprints/MyEnum).
entry_name string yes Display name for the new enumerator.

Returns: { enum_path: string, entry_name: string, added: bool, already_existed: bool, entry_count: int, entries: [string] }

add_message_log_entry

Additive

Add one message to a named editor Message Log listing (for example "PIE", "MapCheck" or a new name, created on demand) at Info, Warning or Error severity; an unrecognised severity becomes Info, and a missing log_name or message is an error. Entries stay in memory for the editor session and are never saved. Use it for diagnostics meant for Window > Message Log; print_to_output_log writes to the Output Log instead. message_count is the listing's message count after the add. Read entries back with get_message_log_entries, show the window with open_message_log, empty the listing with clear_message_log.

Parameter Type Required Description
log_name string yes The message log listing name (e.g. "PIE", "MapCheck", or a custom name).
message string yes The message text to add.
severity string no EMessageSeverity token: "Info" (default), "Warning", "Error".

Returns: { added: bool, log_name: string, message: string, severity: string, message_count: int }

add_struct_member

Additive

Add a field to a Blueprint (user-defined) struct: the way to grow a data shape -- a DataTable row struct, a save record, a component's payload -- without opening the struct editor. Honest on collisions: if the new name is invalid or already used it ROLLS BACK the auto-named member it had to create first and returns an error, instead of reporting success under the engine's MemberVar_N name and leaving orphans behind. Adding a field to a struct a DataTable already uses changes every row (new field at its default), so re-read the table afterwards. get_struct_members lists what is there; rename_struct_member and remove_struct_member are the edits.

Parameter Type Required Description
struct_path string yes Full asset path of the struct (e.g. /Game/Blueprints/MyStruct).
member_name string yes New member name.
member_type string yes Type string resolved through the Blueprint pin-type resolver: scalars (bool, int, int64, float, string, name, text, byte), plus struct/enum/class/object types addressed by name or asset path. An unresolvable string is an error, not a silent default.

Returns: { struct_path, member_name, member_type, member_count }

align_actors

Destructive

Snap two or more editor-world actors onto a shared location, rotation and/or scale taken from a reference (the first, the last, their average, or a named actor). Use it to straighten a hand-placed row or make a set of props share an orientation, in one undoable step; execute_batch of set_actor_transform calls, with transaction=true, is the tool when each actor needs a DIFFERENT transform. WARNING: aligning "location" collapses them onto the same point -- for a row, align only rotation/scale and set positions yourself.

Parameter Type Required Description
actor_names array yes Array of at least 2 INTERNAL actor names (GetName) in the editor world; fewer is an error, and editor labels do not resolve.
align_type string no "location" (default), "rotation", "scale" or "all" -- which transform components get copied from the reference.
reference string no Where the target values come from: "first" (default), "last", "average" (the componentwise mean of all of them), or the internal name of one of the listed actors.

Returns: { aligned_count: int, align_type: string, reference: string, aligned_actors: [actor JSON] }

backup_asset

Destructive

Duplicate an asset into a timestamped /Game/MCP_Backups/ folder. Call this before destructive operations (delete, reparent, overwrite). Accepts a package path or a full object path.

Parameter Type Required Description
path string yes Source asset path (package path like /Game/Foo/Foo or full object path .Foo)

Returns: { source: string, backup_path: string }

begin_transaction

Destructive

Open one undoable transaction so a whole batch of edits collapses into a SINGLE undo entry: every Modify() between this and end_transaction joins it, and cancel_transaction rolls the lot back without leaving anything on the stack. Use it to make a multi-step edit atomically reversible; the returned transaction_index is what end_transaction / cancel_transaction need. already_open:true means one was already running -- transactions do not nest here.

Parameter Type Required Description
description string no Label shown in the editor's undo history (e.g. 'MCP: retag turrets'). Make it recognisable; it is what get_transaction_history and next_undo report.
primary_object_path string no Optional object path recorded as the transaction's PrimaryObject, so the undo entry is attributable to one asset/actor.

Returns: { description: string, transaction_index: int, already_open: bool, undo_count: int }

cancel_automation_test

Destructive Idempotent

Stop the test that run_automation_test or run_functional_test_in_pie left running: an automation test is stopped with its entries so far (get_automation_test_results answers verdict canceled), a functional test is finished as Failed and its session ended when the run requested it (get_functional_test_status answers verdict canceled). With nothing running it changes nothing and answers was_running false, so a repeated call is safe.

No parameters.

Returns: { canceled, was_running, test_name, kind: "automation"|"functional"|"" }

cancel_transaction

Destructive

Abort the transaction opened by begin_transaction: the edits made inside it are rolled back (rolled_back true) and NO entry is written to the undo stack (undo_count is unchanged). The escape hatch when a multi-step edit goes wrong halfway -- cleaner than committing with end_transaction and then calling undo, which leaves history behind. Only what the transaction recorded rolls back: a change the editor does not record for undo (one to a Play-in-Editor object, for instance) stays, and rolled_back is false when nothing was recorded. A transaction that recorded an asset made inside it is not rolled back at all (rolled_back false, with a note): rolling back the making of an asset leaves it broken in memory.

No parameters.

Returns: { success: bool, transaction_index: int (the one that was cancelled), rolled_back: bool (whether recorded edits were reverted), undo_count: int (unchanged -- nothing was recorded), note?: string }

capture_high_res_screenshot

Destructive

Capture a high-resolution (supersampled) screenshot and write it to a PNG SYNCHRONOUSLY. Prefers the Play-In-Editor game view when PIE is active (captured_pie=true); otherwise the active editor viewport. Drives FViewport::TakeHighResScreenShot() + FViewport::Draw(), which renders at resolution_multiplier x the viewport size and blocks (via ProcessScreenShots) until the file is on disk. The "HighResShot" exec path defers the write to the next render frame, which never runs headless, so it writes nothing. Requires a real RHI (errors honestly under -nullrhi) and a live viewport. Note: the supersampled path re-renders the scene, so the UMG/Slate HUD is NOT included; use capture_pie_screenshot for a HUD-inclusive PIE shot.

Parameter Type Required Description
resolution_multiplier number no Resolution multiplier (clamped 1..16, default 2).
filename string no Optional output path; a bare name lands under <ProjectSaved>/Screenshots/, an absolute path is respected verbatim. ".png" is appended if missing. Defaults to a timestamped name.
return_image boolean no Also return the picture as an MCP image block next to this JSON (default true); a picture over the size limits is sent as a smaller copy.

Returns: { written: bool, file_path: string, resolution_multiplier: int, width: int, height: int, captured_pie: bool, image_returned: bool, image_width?: int, image_height?: int, image_note?: string }

capture_viewport

Destructive

Pack play: enable_toolset adds it to a client's list (tool lists).

Screenshot the active editor viewport to a PNG (forcing a fresh draw first), optionally resized and optionally returned inline as base64. Use it to SHOW a result -- proof that something looks right, an image to hand to a human. Do NOT use it to diagnose: an image costs far more context than a command and is read far less reliably than one, so for "is the actor there / did the value change / did it move" prefer get_actor_bounds, get_properties, raycast_scene or a property read, which answer exactly and cheaply. Captures the EDITOR viewport, not a PIE window; capture_high_res_screenshot is the higher-resolution sibling.

Parameter Type Required Description
width integer no Optional target width to downscale/upscale to (omit to keep native viewport size).
height integer no Optional target height (only used when width is also supplied).
filename string no Optional output filename (default MCP_Capture_<timestamp>.png); ".png" extension is added if missing.
return_base64 boolean no bool, also include image_base64 + image_format in the response (default false).
return_image boolean no Also return the picture as an MCP image block next to this JSON (default true); a picture over the size limits is sent as a smaller copy.

Returns: { file_path: string, width: int, height: int, byte_size: int, image_base64: string, image_format: string, image_returned: bool, image_width?: int, image_height?: int, image_note?: string }

clear_debug_shapes

Destructive Idempotent

Remove debug shapes from the editor world (default) or a PIE world: by default only what draw_debug_shapes drew (its lines, points and text), with all=true every persistent debug line, point and string in that world, the engine's and other tools' included. Reports how many were there before and after.

Parameter Type Required Description
all boolean no Optional bool (default false): also clear the debug lines and strings that something other than draw_debug_shapes drew.
world string no Optional world selector: absent/'editor' (default) | 'pie' (ambiguous: PlayWorld, else the first PIE context) | 'server' (the PIE world with authority) | 'client' | 'pie:N' | 'game' (alias of 'pie').

Returns: { cleared_lines: int, cleared_texts: int, remaining_lines: int, remaining_texts: int, requested?: object, world_name, world_package, world_type, net_mode, pie_instance }

clear_message_log

Destructive Idempotent

Clear all messages from a named engine Message Log listing.

Parameter Type Required Description
log_name string yes The message log listing name (e.g. "PIE", "MapCheck", or a custom name).

Returns: { cleared: bool, log_name: string, cleared_count: int, messages_after: int }

close_asset_editor

Additive Idempotent

Close every editor open on one asset (asset_path), or every asset editor (close_all=true). Unsaved changes are not lost and not saved: the asset stays modified in memory (the dirty flag in the reply), so save_asset it if you mean to keep them. An asset that is not loaded, or has no editor open, is a no-op success with closed_count 0. The outcome is read back: success only when no editor is left open on what was asked.

Parameter Type Required Description
asset_path string no Object path, package path or unambiguous bare asset name of the asset whose editors to close. Required unless close_all is true.
close_all boolean no Optional bool (default false): close every open asset editor; asset_path is then ignored.

Returns: { closed_count: int, still_open_count: int, closed_assets: [{ asset_path: string, asset_class: string, dirty: bool }], close_all: bool }

consolidate_assets

Destructive

Redirect every reference to the source assets onto the target with UEditorAssetSubsystem::ConsolidateAssets, which DELETES the sources (leaving redirectors) and saves what it changed. Only class-compatible sources are used; others are listed in skipped_incompatible and unloadable ones are dropped silently. dry_run=true only reports.

Parameter Type Required Description
target_asset_path string yes The asset to keep, all references point here
source_asset_paths array yes Assets to consolidate into the target
dry_run boolean no If true, skip ConsolidateAssets entirely and only report what would happen, default false

Returns: dry_run=true: { target_asset_path, target_class, dry_run: true, would_consolidate: [string], skipped_incompatible: [{path,class}], compatible_count: int, incompatible_count: int }; dry_run=false (default): { target_asset_path, target_class, dry_run: false, consolidated_count: int, source_count: int, success: bool, skipped_incompatible: [{path,class}], incompatible_count: int }

copy_actors

Destructive

Put editor-world actors on the editor CLIPBOARD (edactCopySelected), either by name or whatever is currently selected, so paste_actors can drop them back -- the way to clone a group while keeping their relative layout, which duplicate_actor (one actor, in place) does not do. WARNING: naming them REPLACES the current selection as a side effect, and matching is by INTERNAL name only. One of actor_names or copy_selected=true is required.

Parameter Type Required Description
actor_names array no Optional array of internal actor names (GetName) to copy; supplying it re-selects exactly those actors first.
copy_selected boolean no Optional bool. True (with actor_names omitted) copies whatever is selected right now, leaving the selection alone.

Returns: { copied_count: int, success: bool (the copied text names every copied actor), missing_from_copy?: [string] }

create_blueprint_interface

Additive Refused during PIE

Create an empty Blueprint Interface asset at path/name (a contract of function signatures that unrelated Blueprints implement, so a caller sends the message without knowing the concrete class) and mark its package dirty without saving it; there is no undo step. Use it when several kinds of actor must answer the same request (interact, take damage, work) without sharing a base class; when they can share one, use create_blueprint with a common parent instead. An asset already at that path, or an invalid name, is an error and nothing changes, so a repeat call fails. Refused while Play-in-Editor runs unless force=true. Next: add each signature with add_blueprint_function, add the interface to each class with implement_interface, implement each function there with add_blueprint_function (override=true), and save with save_asset.

Parameter Type Required Description
name string yes Asset name without folder, e.g. "BPI_Interactable"; must be a valid asset name not already used in that folder.
path string no Content folder for the new asset, e.g. "/Game/Blueprints/Interfaces" (default /Game/Blueprints); a trailing slash is ignored.

Returns: { name, path, type }

create_directory

Additive Idempotent

Make a content-browser folder at a UE long path (e.g. /Game/MyGame/Systems/Foo). Idempotent: an existing folder is not an error, it comes back already_existed:true. Use it to lay out a system's folders before creating assets there; a path that does not start with '/' is rejected.

Parameter Type Required Description
path string yes UE long path of the folder to create, e.g. /Game/MyGame/Systems/Foo. Must start with '/', not a disk path.

Returns: { path: string, already_existed: bool (true = nothing was created, and that is a success) }

create_enum

Additive

Create a Blueprint enum asset from an ordered list of enumerator DISPLAY names -- states, categories and types that Blueprints and DataTable columns switch on. Errors if the asset already exists (not idempotent). Beware the display/internal split that follows: the engine stores enumerators internally as NewEnumerator0, NewEnumerator1, ... and writers into DataTables must use those internal names, because a display name containing spaces is cut at the first space by the text importer and silently lands on index 0. So keep single-word display names, or expect to write NewEnumeratorN. add_enum_entry / rename_enum_entry / reorder_enum_entry edit it afterwards.

Parameter Type Required Description
name string yes Enum asset name.
entries array yes Ordered list of enumerator display-name strings.
path string no Target content path for the new asset (default /Game/Blueprints)

Returns: { name, path, entry_count }

create_file_media_source

Additive

Create a UFileMediaSource asset at package_path/name that points at a movie file path, register it and save it; the file does not need to exist. An existing asset is returned unchanged (file_path is not applied). Returns asset_path, the stored file_path, created and saved.

Parameter Type Required Description
name string yes Name of the file media source asset to create.
file_path string yes Movie file on disk, absolute or "./"-relative to the project Content folder, e.g. "./Movies/Intro.mp4"; a path inside Content is stored in that relative form.
package_path string no Target content package path where the asset is created (default /Game/Media)

Returns: { media_source_name, asset_path, created, already_exists, file_path, saved, save_error }

create_functional_test

Additive Idempotent Refused during PIE

Create a Blueprint subclass of AFunctionalTest (an actor placed in a test map that runs scripted checks and reports pass or fail to the automation framework) at package_path/asset_name, then save it; there is no undo step. Use it to author a level-based gameplay test; for an ordinary actor Blueprint use create_blueprint, and to run registered tests use run_automation_test (list them with list_automation_tests). Idempotent: a Functional Test Blueprint already at that path whose parent is parent_class (or a subclass of it) is returned as it is, with already_existed true, and saved again; parent_class is the parent read from the Blueprint. A Blueprint there that is not a Functional Test, or whose parent is not parent_class or a subclass of it, is refused and nothing is saved (remove it with delete_asset or pick another asset_name). A parent that is not found or is not a Functional Test, or an asset of another type at the path, is an error and nothing changes. A failed save makes success false, with saved false and the Blueprint only in memory. Refused while Play-in-Editor runs unless force=true. Then script it with add_blueprint_function and add_graph_node, and place it in a map with spawn_actor.

Parameter Type Required Description
asset_name string yes Asset name of the new Blueprint without folder, e.g. "BP_FT_PlayerHealth".
package_path string no Content folder for the asset, e.g. "/Game/Tests" (default /Game/MCP).
parent_class string no Optional parent: a class deriving from AFunctionalTest, by name without prefix (e.g. "FunctionalTest", the default, or "FunctionalAITest") or by /Script/ path; a Blueprint parent must be loaded and named by its generated class (e.g. "BP_FT_Base_C"). A Blueprint already at the path must have this parent or a subclass of it.

Returns: { asset_name, asset_path, package_class, parent_class, already_existed, saved }

create_media_player

Additive

Create a UMediaPlayer asset at package_path/name with PlayOnOpen and looping set, optionally with a linked UMediaTexture named "<name>_T" beside it, and save both. An existing player is returned unchanged (flags not applied). Returns asset_path, play_on_open, loop, media_texture_path, saved and texture_saved.

Parameter Type Required Description
name string yes Name of the media player asset to create.
package_path string no Target content package path where the asset is created (default /Game/Media)
create_output_texture boolean no Also create a UMediaTexture "<name>_T" next to the player and link it (default true).
play_on_open boolean no Set the player's PlayOnOpen flag (default true)
loop boolean no Set the player to loop via SetLooping (default false)

Returns: { media_player_name, asset_path, created, already_exists, play_on_open, loop, texture_created, media_texture_path, saved, texture_saved, save_error, texture_save_error }

create_media_texture

Additive

Create a UMediaTexture asset at package_path/name (AutoClear on, no player linked) and save it; an existing texture is returned unchanged, with its linked player if any. Link a player with link_media_texture_to_player. Returns asset_path, created, has_media_player and saved.

Parameter Type Required Description
name string yes Name of the media texture asset to create.
package_path string no Target content package path where the asset is created (default /Game/Media)

Returns: { media_texture_name, asset_path, created, already_exists, has_media_player, media_player_path, saved, save_error }

create_struct

Destructive Idempotent

Create a Blueprint Struct (UUserDefinedStruct). Idempotent by reset+rebuild: a stale struct already at the path is deleted and recreated fresh (reset_stale:true); a same-path asset of a different type is an honest error.

Parameter Type Required Description
name string yes Asset name (no path)
path string no Target content path for the new asset (default /Game/Blueprints)

Returns: { name, path, reset_stale }

delete_actor

Destructive

Pack actors: enable_toolset adds it to a client's list (tool lists).

Remove one actor from the EDITOR level through the editor's own delete path (select + edactDeleteSelected), so it is transacted and undoable, and echo back the deleted actor's JSON. WARNING: two edges that bite: it matches the INTERNAL name only -- unlike set_actor_transform, an editor LABEL will not resolve -- and it clears the current selection as a side effect. It cannot touch PIE actors (editor world only), and the deletion lives in memory until save_level writes the .umap. Use delete_actors for several at once.

Parameter Type Required Description
name string yes Actor's internal name (GetName), case-insensitive but WHOLE-string. Editor labels are NOT accepted here; resolve one first with find_actors_by_name.

Returns: { deleted_actor: actor JSON captured before the delete }

delete_actors

Destructive

Delete several editor-world actors at once through the editor's own delete path, in ONE undoable transaction (a single undo brings them all back), returning the count and the JSON of each actor captured before deletion. WARNING: matches INTERNAL names only -- editor labels do not resolve -- names it cannot find are skipped silently, so compare deleted_count against how many you asked for; and if NONE resolve it errors with "No actors found to delete". Editor world only, and the removal is in memory until save_level writes the .umap.

Parameter Type Required Description
actor_names array yes Array of internal actor names (GetName), case-insensitive whole-string. Unmatched entries are dropped without an error; resolve labels first with find_actors_by_name.

Returns: { deleted_count: int (compare against your input length), deleted_actors: [actor JSON captured before the delete] }

delete_assets

Destructive

GUARDED batch asset deletion; dry_run DEFAULTS TO TRUE, so pass dry_run=false to delete. Four gates REFUSE per item rather than skip silently: readonly_roots (default: the project's Read Only Content Roots), protect_paths (wildcards), the currently open editor world, and the opt-in require_zero_referencers, whose count EXCLUDES referencers in the same batch (a self-contained dead subgraph can go whole). The eligible batch is force-deleted in one pass. deleted_count counts ONLY items whose package file is gone AND whose object no longer resolves at its path; each failure names the probe that still sees it.

Parameter Type Required Description
asset_paths array yes List of asset paths (or folder paths when recursive is true). Required, non-empty.
recursive boolean no If true, expand folder paths to all contained assets. Default false.
dry_run boolean no Default TRUE. Nothing is deleted; would_delete reports what WOULD go, with each item's gate verdict. Pass false to actually delete.
readonly_roots array no Content roots that may never be deleted from. Default: the project's Read Only Content Roots; pass [] to disable the gate entirely. Matches are REFUSED (refused_readonly_root), never silently skipped. (Read via mcp_common::ParseReadonlyRoots, so the type is declared here.)
protect_paths array no Wildcard patterns (FString::MatchesWildcard, case-insensitive, * spans '/') matched against both the package name and the object path. Default [] (gate off). Matches are REFUSED (refused_protected).
require_zero_referencers boolean no Default FALSE. When true, an asset with at least one referencer OUTSIDE this batch is refused. The per-item external_referencer_count is reported either way.
dependency_type string no Referencer filter for the count above: "hard"|"soft"|"all" (case-insensitive), default "all".

Returns: { requested_count, expanded_count, recursive, dry_run, readonly_roots: [string], protect_paths: [string], require_zero_referencers: bool, dependency_type: string, expanded_folders: [{folder, asset_count}], eligible_count, would_delete: [{path, package_name, external_referencer_count, external_referencers: [string], on_disk}], deleted: [{path, package_name, deleted, still_loaded, error?}], deleted_count, failed_count, force_delete_reported_count, refused_readonly_root: [{path, matched_root}], refused_protected: [{path, matched_pattern}], refused_referenced: [{path, external_referencer_count, external_referencers: [string]}], refused_open_world: [{path, reason}], refused_count, results: [{path, success, error}], note, verification: {...} }

delete_directory

Destructive Idempotent

DESTRUCTIVE: removes a content-browser folder AND every asset inside it, recursively, with no dry-run and no referencer check (unlike delete_assets, which defaults to dry_run and refuses vendored roots). Driven through UEditorAssetSubsystem, which is the pair that works headless. Idempotent: an already-absent folder answers already_absent:true. Verify afterwards with git status on the corresponding Content/ path -- never with the deleted flag alone.

Parameter Type Required Description
path string yes UE long path of the folder to delete, e.g. /Game/Scratch. Must start with '/'. Everything under it goes.

Returns: { path: string, already_absent: bool, deleted: bool }

deselect_actors

Destructive

Drop specific actors from the editor selection, or clear it entirely with deselect_all. The counterpart of select_actors; use the clear-all form to leave the editor in a known state before a tool that acts on the selection (copy_actors, move_actors_to_level) so it does not pick up leftovers. Editor world only; matches INTERNAL names.

Parameter Type Required Description
actor_names array no Optional array of internal actor names (GetName) to remove from the selection. One of actor_names or deselect_all=true is required.
deselect_all boolean no Optional bool. True clears the whole selection; it wins over actor_names when both are sent.

Returns: { deselected_all: bool, deselected_count: int }

draw_debug_shapes

Additive

Draw debug lines, boxes, spheres, arrows, points and text into the editor world (default) or a PIE world, to show a location, a bound, a path or a trace in the viewport. Each shape lasts duration seconds, or until clear_debug_shapes with persistent=true; nothing is saved, selectable or undoable.

shapes is a list of objects with a type and its fields, positions in world units: line {start, end}; arrow {start, end, size = head size, default 20}; box {center, extent = half size, default [50,50,50], rotation = {pitch, yaw, roll} degrees}; sphere {center, radius (default 50), segments (4..64, default 16)}; point {location, size in pixels (default 10)}; text {location, text, size = font scale (default 1)}. Any shape may carry its own color and thickness. Text goes to the HUD of each local player, so it is drawn only in a PIE world with a HUD; in the editor world it is skipped and the reply says so. An invalid shape is an error and nothing is drawn.

Parameter Type Required Description
shapes array yes Required list of shape objects as described above, at most 2000.
color array no Optional default color [R, G, B] or [R, G, B, A] in 0..1 (default green [0, 1, 0, 1]); a shape's own color wins.
thickness number no Optional default line thickness in world units (default 0 = one pixel, clamped 0..1000); a shape's own thickness wins.
duration number no Optional seconds the shapes stay (default 10, clamped 0.01..86400); ignored when persistent is true. The editor world counts them down while the editor ticks.
persistent boolean no Optional bool (default false): keep the shapes until clear_debug_shapes.
foreground boolean no Optional bool (default false): draw lines and points over the scene instead of depth-tested in it.
world string no Optional world selector: absent/'editor' (default) | 'pie' (ambiguous: PlayWorld, else the first PIE context) | 'server' (the PIE world with authority) | 'client' | 'pie:N' | 'game' (alias of 'pie').

Returns: { shapes_requested: int, drawn: int, lines_added: int, texts_added: int, skipped: [{ index: int, type: string, reason: string }], by_type: { line?: int, box?: int, sphere?: int, arrow?: int, point?: int, text?: int }, lifetime_seconds: float (-1 = until cleared), batcher: string, requested?: object, world_name, world_package, world_type, net_mode, pie_instance }

duplicate_actor

Additive

Copy one editor-world actor in place through the editor's duplicate path, keeping its component overrides, and return both the new actor's JSON and the original's. Undoable; it changes the editor SELECTION as a side effect. Matches the INTERNAL name only (no editor labels). The clone exists in memory until save_level writes the .umap -- and a save that answers success while git status stays clean means the .umap is read-only (e.g. a Git LFS lockable file you have not locked), not that the duplicate failed.

Parameter Type Required Description
actor_name string yes Actor's internal name (GetName), case-insensitive whole-string. Editor labels are NOT accepted; resolve one with find_actors_by_name first.

Returns: { duplicated_actor: actor JSON (its auto-assigned name lives here), original_actor: actor JSON }

end_transaction

Destructive

Close the transaction opened by begin_transaction and COMMIT it, so everything done inside becomes one entry on the editor's undo stack (undo_count grows by one). Pair it with every begin_transaction -- leaving one open makes later edits silently join it. Use cancel_transaction instead when you want the batch thrown away rather than kept. A transaction that holds objects of the running Play-in-Editor session (a widget made with create_widget) is closed without an undo entry, recorded false: the edits stay, and keeping it would close the editor when PIE stops. So is one that recorded an asset made inside it, because undoing the making of an asset leaves it broken in memory.

No parameters.

Returns: { success: bool, transaction_index: int (the one that was closed), recorded: bool (false: no undo entry, see note), undo_count: int after the commit, note?: string }

execute_console_command

Destructive

Run a console command through the EDITOR (GEditor->Exec against the editor world): cvars, stat overlays, r.* toggles, engine commands. WARNING: it does NOT reach a running PIE session's PlayerController, so player cheats like BugItGo come back handled:false -- to move or cheat a PIE pawn use execute_python against the anchored PIE world. handled is the engine's own "some Exec claimed this string", not proof of an effect: verify with the state (get_cvar, a property read), never with this bool.

Parameter Type Required Description
command string yes Console command line, e.g. 'stat fps', 'r.ScreenPercentage 50', 'ShowFlag.Grid 0'. Editor-side only.

Returns: { command: string, handled: bool (an Exec handler claimed the string -- not evidence the effect happened) }

execute_python

Destructive Open world

Core tool: every client lists it by default.

Run Python in the running Unreal Editor, with Unreal's unreal API, for what no tool does: search find_tools first, since most tools are not in a client's list. A script that raises fails the call, with the traceback in command_result.

mode: ExecuteFile runs a script of any length, ExecuteStatement runs one statement and prints its result, EvaluateStatement returns one expression's value in command_result. Scripts share the editor console's globals across calls.

output and log_output hold what the script prints and logs; the engine's own log during the call is only in engine_log. When a call succeeds and nothing happened, read engine_log, widen it with engine_log_level=Log, or pass log_cursor_before to get_output_log_lines.

On "Object has no attribute", ask the object (dir(x), x.to_dict(), x.get_editor_property(...)) instead of guessing.

During Play-in-Editor a compile or save in the script (compile_blueprint, save_asset, save_packages, save_current_level...) raises RuntimeError and the call fails with pie_refused, even if caught; an uncompiled Blueprint edit is not caught, so stop PIE before editing one. Reading the live world is safe.

Prefer a tool over an actor loop: get_actors_by_class, get_actor_properties_by_class, get_properties, get_actor_components, raycast_scene, watch_pie_property; a script that only enumerates actors gets a hint naming the tool.

Parameter Type Required Description
command string yes Python code to run (single or multi-line).
capture_output boolean no Has no effect, and is accepted so older calls keep working: the output is always captured, and mode decides whether the code runs as a script or as one statement.
mode string no Execution mode: ExecuteFile, ExecuteStatement, or EvaluateStatement (default ExecuteFile). Any other value runs as ExecuteFile; execution_mode in the reply says which ran.
engine_log_level string no Minimum severity of ENGINE log to return in engine_log: Error, Warning (default), Display, Log/All.
engine_log_max string no Max lines in engine_log (default 50, 0 disables, hard cap 4096).

Returns: { command, python_success, execution_mode, command_result, output, log_output, log_line_count, engine_log, engine_log_count, engine_log_truncated, log_cursor_before, pie_refused?, hint? }

execute_python_file

Destructive Open world

Execute a Python (.py) file inside the running Unreal Editor, for what no tool does. The file goes through the same checks as execute_python: the calls known to crash the editor are refused before it runs, and while Play-in-Editor runs a call that compiles a Blueprint or saves does NOT run (the script gets a RuntimeError and the tool call fails with pie_refused) -- a script that changes a Blueprint without compiling it is not seen, so stop PIE before editing a Blueprint. A script that raises fails the call, with the traceback in command_result. Reading the live world during PIE is safe. WARNING: log_output IS NOT THE LOG OF THE CALL -- it is Python's own prints only (UE fills it from a delegate broadcast solely by unreal.log/log_warning/log_error), so every UE_LOG the ENGINE emits during your script is absent from it. Read engine_log instead: it is the GLog slice bracketed to this call, Warning+Error by default. Example: build_meta_human can run, return None, write zero assets and report a clean log_output while "LogMetaHumanCoreTechLib: Error: Texture Synthesis has not been initialized" sits in GLog. When a call reports success and NOTHING HAPPENED, engine_log is the first place to look; widen with engine_log_level=Log, or pass log_cursor_before to get_output_log_lines(since_sequence_id=...) for the unfiltered rest.

Parameter Type Required Description
file_path string yes Absolute path to a .py file accessible from the editor host.
engine_log_level string no Minimum severity of ENGINE log to return in engine_log: Error, Warning (default), Display, Log/All.
engine_log_max string no Max lines in engine_log (default 50, 0 disables, hard cap 4096).

Returns: { file_path, python_success, command_result, output, log_output, log_line_count, engine_log, engine_log_count, engine_log_truncated, log_cursor_before, pie_refused?, hint? }

export_assets

Destructive

Export assets to files via IAssetTools::ExportAssets (preferred format, FBX/PNG/EXR first), each written to export_path/<package path without its leading slash>.<extension>, e.g. D:/Exports/Game/Meshes/SM_Rock.FBX. What was written is measured per asset on disk: exported lists each asset with its file, and not_exported the ones that did not load, have no exporter or failed to write. Succeeds only when every requested asset was written.

Parameter Type Required Description
asset_paths array yes Asset object or package paths to export (e.g. ["/Game/Meshes/SM_Rock"]); empty strings are ignored.
export_path string yes Destination directory on disk (e.g. "D:/Exports"), created if missing; each file lands in subfolders named after its package path.

Returns: { exported_count: int, failed_count: int, requested_count: int, export_path: string, exported: [{ asset_path: string, file: string }], not_exported: [string] }

find_actors_by_name

Read-only

Pack actors: enable_toolset adds it to a client's list (tool lists).

Locate actors by a SUBSTRING of their internal name and/or their editor label, returning name, label, class and transform for each hit. This is the one to use when you know what a thing is CALLED but not its class -- get_actors_by_class needs an exact class name, and this one alone can search labels (match='label'), which is where hand-assigned names live. Plain case-INSENSITIVE substring, no wildcards and no regex: 'turret' matches BP_Turret_C_2, and '*' matches literally nothing. Its world selector is the canonical one: 'editor' (default), 'pie'/'game', 'server', 'client' and 'pie:N' all resolve for real, an unrecognised value FAILS instead of falling through to the editor world, and the reply stamps world_package/world_type/net_mode/pie_instance so you can tell which world answered.

Parameter Type Required Description
pattern string yes Substring to look for, case-insensitive, no wildcards or regex. Cannot be empty.
match string no Optional 'name' | 'label' | 'both' (default 'both'). 'name' = internal object name only; 'label' = the editor label from the outliner; 'both' = a hit on either. An unknown value is a clean error.
max_results number no Optional cap on hits (default 1000); results_truncated says whether the scan stopped early.
world string no Optional world selector: absent/'editor' (default) | 'pie' (ambiguous: PlayWorld, else the first PIE context) | 'game' (alias of 'pie') | 'server' (the PIE world with authority, GetNetMode() != NM_Client) | 'client' | 'pie:N' (the PIE context whose PIEInstance is N). Case-insensitive; an unrecognised value is a clean error listing the worlds present, never a silent fallback to the editor world.

Returns: { matching_actors: [ { name, actor_name, label, class, location, rotation, scale, is_loaded } ], matching_actors_count: int, search_pattern: string, match: string, results_truncated: bool, max_results: int, world: string (the normalized selector that resolved), world_name: string, world_package: string (in World Partition the UEDPIE_N prefix lives HERE, not in world_name), world_type: string, net_mode: string, pie_instance: int }

find_duplicate_assets

Read-only

Find groups of assets that share the same asset name under a content folder tree (e.g. the same name under both a vendored library tree and a first-party fork), from Asset Registry metadata only: nothing is loaded and contents are not compared, so a group means same name, not same data. Groups come most-duplicated first, each with name, count, classes and every asset's path, package and class. Use it to triage name clashes before cleanup: get_asset_referencers shows who uses each copy, audit_fork_refs checks references between a library and its fork, consolidate_assets merges copies and find_unused_assets finds unreferenced ones. Read-only and idempotent. group_count counts the groups returned, results_truncated says when max_results cut some, total_duplicate_assets counts the extra copies (count - 1 per group) and assets_scanned the assets left after class_filter. No duplicates gives group_count 0, not an error.

Parameter Type Required Description
folder_path string no Content folder to scan, a package path such as /Game/Characters, default /Game
recursive boolean no If true, scan subfolders, default true
min_group_size integer no Minimum number of same-named assets to report as a duplicate group, default 2 (a value below 1 counts as 2)
class_filter array no Optional list of class short names (e.g. "StaticMesh","Material"); only assets whose AssetClassPath short name case-insensitively matches one of these are considered
max_results integer no Cap on the number of duplicate GROUPS returned (not raw assets), clamped 1..20000, default 2000

Returns: { folder_path, recursive, class_filter, min_group_size, group_count, total_duplicate_assets, assets_scanned, max_results, results_truncated, groups: [{ name, count, classes: [string], assets: [{path, package, class}] }] } (groups sorted by count descending)

find_unused_assets

Read-only

Find assets in a folder with zero referencers, and annotate each survivor with the reasons it should be KEPT anyway. "Zero referencers" is not the same as "safe to delete": there are three common ways an asset stays alive with an empty referencer set -- it is explicitly protected, a Config/Default*.ini names it, or it is a fork descending from a vendored base library. Each becomes a keep_reason string on the entry; deletion_candidates lists only the entries of this page with NO keep_reason (deletion_candidate_count counts all of them). unused_assets come sorted by path, a page at a time (offset/limit). Nothing is ever removed from unused_assets by these flags (hiding a genuinely unreferenced asset would be the same lie in the other direction). NOTE: there is deliberately no is_world -- it is already visible in class_name ("World").

Parameter Type Required Description
folder_path string yes Content folder to scan, e.g. /Game/Unused
recursive boolean no If true, scan subfolders, default true
exclude_classes array no Optional list of class name fragments to skip
dependency_type string no Referencer filter: "hard"|"soft"|"all" (case-insensitive), default "all" (identical behavior to omitting it)
protect_paths array no Wildcard patterns (FString::MatchesWildcard, case-insensitive, * spans '/') matched against the package name and the object path. Default [] . A match adds keep_reason "protected_path".
include_lineage_reasons boolean no Default FALSE because it LOADS every candidate Blueprint. When true, a Blueprint whose super chain reaches a class owned by one of base_libraries gets keep_reason "descends_from_base_library" -- the only signal that saves a fork carrying no fork-origin tag (project setting Fork Origin Tag).
base_libraries array no Vendored-library content roots for the lineage check. Default: the project's Read Only Content Roots (same default as audit_class_purity).
offset integer no Index of the first entry returned, counted from 0 (default 0). Read the next page at the reply's next_offset.
limit integer no Most entries returned per call, 1..1000 (default 100).

Returns: { folder_path, folder_exists, recursive, dependency_type, protect_paths: [string], include_lineage_reasons, base_libraries: [string], unused_assets: [{path, class_name, size_kb, keep_reasons: [string], keep_reason_detail: {...}}], unused_count (entries in this page), total_scanned, deletion_candidates: [string], deletion_candidate_count, assets_with_keep_reason, keep_reason_counts: {protected_path, referenced_by_config, descends_from_base_library}, config_scan: {files_scanned: int, files: [string]}, lineage_scan: {attempted, blueprints_loaded, skipped_non_blueprint, load_failures}, total: int, offset: int, limit: int, returned: int, truncated: bool, next_offset: int|null }

fixup_redirectors

Destructive

Clean up the redirectors a rename/move left behind, under a folder: load each referencing package (which repoints it) and re-save it, optionally force-deleting redirectors whose referencers all saved. Hand-rolled on purpose -- IAssetTools::FixupReferencers HARD-CRASHES on World-Partition/OFPA projects -- and heavily railed: it REFUSES while PIE is active, never writes under readonly_roots (default: the project's Read Only Content Roots), never outside /Game, and never loads or saves map or OFPA packages, handing the resident ones back in skipped_current_world for you to save_level instead. Deletions are DISK-verified (a redirector whose .uasset survives lands in redirectors_delete_failed, not in the count). WARNING: redirectors_found/deleted count OBJECTS: one renamed Blueprint leaves THREE in a single package -- read redirector_packages_found for files.

Parameter Type Required Description
path string no Long path to scan, defaults to /Game
delete_redirectors boolean no Optional bool (default false). After a successful repoint, force-delete the redirectors whose every non-redirector referencer was saved. Left in place by default (a redirector is ~2 KB and harmless).
readonly_roots array no Optional array of long-path prefixes that must NEVER be written (default: the project's Read Only Content Roots, i.e. the vendored library roots). Referencers under them are reported in skipped_readonly instead of being saved.

Returns: { path: string, redirectors_found: int, redirector_packages_found: int, referencers_repointed: int, packages_saved: int, packages_failed: [{ package: string, error: string }], skipped_readonly: [string], skipped_current_world: [string], redirectors_deleted: int, redirector_packages_deleted: int, redirectors_delete_failed: [{ package: string, reason: string }], redirectors_fixed: int, message: string }

get_actors_in_level

Read-only

Dump EVERY actor of a world (name, class, transform), capped by max_results at 5000, with total_actors_in_level and results_truncated so you know if you saw all of it. The unfiltered census: reach for get_actors_by_class when you know the class, find_actors_by_name for a name/label substring, get_actors_in_radius for a place. Its world selector is the canonical one: 'editor' (default), 'pie'/'game', 'server', 'client' and 'pie:N' all resolve for real, an unrecognised value FAILS naming the worlds that exist instead of quietly answering from the editor world, and every reply carries world_package/world_type/net_mode/pie_instance so you can see WHICH world answered rather than assuming.

Parameter Type Required Description
max_results number no Optional cap on returned actors (default 5000). Must be > 0. Truncation is reported, never silent.
world string no Optional world selector: absent/'editor' (default) | 'pie' (ambiguous: PlayWorld, else the first PIE context) | 'game' (alias of 'pie') | 'server' (the PIE world with authority, GetNetMode() != NM_Client) | 'client' | 'pie:N' (the PIE context whose PIEInstance is N). Case-insensitive; an unrecognised value is a clean error listing the worlds present, never a silent fallback to the editor world.

Returns: { actors: [actor JSON], actors_count: int, total_actors_in_level: int, results_truncated: bool, max_results: int, world: string (the normalized selector that resolved), world_name: string, world_package: string (in World Partition the UEDPIE_N prefix lives HERE, not in world_name), world_type: string, net_mode: string, pie_instance: int }

get_asset_compilation_status

Read-only

What the editor is still compiling in the background, per kind: shaders, textures, static_meshes, skeletal_meshes, sound_waves and every other asset compiling manager the engine registers (mesh distance fields, mesh cards, animation sequences, Niagara systems...), with the count left for each and, on request, which assets. A count of 0 everywhere means rendering, cooking and measurements see final data; wait_for_asset_compilation blocks until it is so.

Parameter Type Required Description
kinds array no Optional list of kinds to report, by kind ("textures") or engine type name ("UE-Texture"), case-insensitive; default all. An unknown kind is an error that lists the kinds there are.
include_assets boolean no Optional bool (default false): also list the object paths still compiling for textures, static_meshes, skeletal_meshes and sound_waves (the other kinds only have a count).
max_assets integer no Optional int (default 50, clamped 1..1000): most paths listed per kind; assets_total still counts them all.

Returns: { compiling: bool, total_remaining: int, kinds: [{ kind: string, type_name: string, remaining: int, assets_listable: bool, assets?: [string], assets_total?: int, assets_truncated?: bool }], shader_jobs?: { outstanding: int, pending: int, remaining: int, compiling: bool } }

get_automation_test_results

Read-only

The state of the test run_automation_test started, without running anything: while a latent test runs, running true with verdict running and elapsed_seconds; once it ended, its verdict, duration_s, errors, warnings and entries, with timed_out or canceled when it was stopped before it finished. Poll it after run_automation_test answers verdict running. Skipped tests leave it unchanged; fails when no test has run this editor session.

No parameters.

Returns: { test_name, started, completed, running, passed?, verdict: "pass"|"fail"|"canceled"|"running", elapsed_seconds, timed_out, canceled?, duration_s?, errors?, warnings?, entries?:[{type,message,context,filename,line}], entry_count?, timeout_seconds?, note? }

get_content_browser_path

Read-only

Read the folder the primary Content Browser is showing: its content path ('/Game/Maps', what the asset tools take) and its virtual path as the browser displays it ('/All/Game/Maps'). Use it to create or import assets "where the user is looking". path is empty when the browser shows a virtual folder with no content path behind it, or when there is no Content Browser (has_content_browser false).

No parameters.

Returns: { path: string, virtual_path: string, has_internal_path: bool, has_content_browser: bool }

get_current_level

Read-only

Pack levels: enable_toolset adds it to a client's list (tool lists).

Which map a world is sitting on: level_name, its package_name (/Game/... or /Engine/...), the resolved disk filename, whether the package is dirty, and a live actor count. package_name is the discriminator that catches the classic mistake -- if it starts with /Engine/ you are on an engine template (what load_level with default_template=true leaves behind) and a save_level without filename would overwrite the ENGINE's own map. Defaults to the EDITOR world; it also takes the standard world selector, so during PIE you can ask the play world ('pie'/'server'/'client'/'pie:N') instead of being told about the authoring map and having no way to know it.

Parameter Type Required Description
world string no Optional world selector: absent/'editor' (default -- the authoring map even while PIE runs) | 'pie' (ambiguous: PlayWorld, else the first PIE context) | 'game' (alias of 'pie') | 'server' (the PIE world with authority) | 'client' | 'pie:N'. Case-insensitive; an unrecognised value is a clean error listing the worlds present, never a silent fallback to the editor world.

Returns: { level_name: string, package_name: string (the /Game or /Engine path -- read this one), filename: string, is_dirty: bool, actor_count: int, world: string (the normalized selector that resolved), world_name: string, world_package: string (the UEDPIE_N prefix lives HERE, not in world_name), world_type: string ("Editor" | "PIE" | ...), net_mode: string, pie_instance: int }

get_cvar

Read-only

Read the live value of one console variable of the running editor through IConsoleManager, without changing it: the value as a string and parsed as int, float and bool, its help text, its raw flags and set_by (which layer last set it, such as Constructor, Scalability, ProjectSetting or Console). Use it to read one variable by exact name; to find names by substring or prefix use list_cvars; to change a value use set_cvar (or set_cvars_from_json for many); scalability groups as a whole: get_scalability_levels. A name that is not a registered console variable (including a console command, which has no value) is an error.

Parameter Type Required Description
name string yes Exact console variable name, e.g. "r.ScreenPercentage" or "t.MaxFPS", as list_cvars returns it (case-insensitive).

Returns: { name: string, value: string, string_value: string, int_value: int, float_value: float, bool_value: bool, help: string, flags: int, set_by: string }

get_engine_ini_value

Read-only

Read one key from the merged in-memory config (GConfig) of an INI such as Engine or Game. Read-only; returns value and found (false, with an empty value, when the section or key is missing). Pass config_file without .ini. Writer: set_engine_ini_value.

Parameter Type Required Description
section string yes Section name (e.g. "/Script/Engine.RendererSettings")
key string yes Key inside the section, e.g. "r.DefaultFeature.AntiAliasing".
config_file string no Config base name without extension, e.g. "Engine" (default), "Game", "Input", "Editor", "Scalability"; "Engine.ini" is not resolved.

Returns: { section, key, value, found }

get_functional_test_status

Read-only

The state of the functional test run_functional_test_in_pie started, without changing anything: running, then its verdict (pass, fail, unknown or not_run), the actor's test_result, the last message it logged, elapsed_seconds, timed_out, and pie_stopped when the session this run requested was ended. has_test is false when no functional test has run this editor session. Poll it after run_functional_test_in_pie.

No parameters.

Returns: { has_test, running, test_asset_path, verdict: "running"|"pass"|"fail"|"unknown"|"not_run"|"canceled", test_result, message, elapsed_seconds, timeout_seconds, timed_out, canceled, session_started_by_call, pie_stopped, test_started }

get_level_blueprint

Additive

Get (or, with create=true, bring into being) the current level's Level Blueprint and return the blueprint_path that the graph tools need -- its event graph is always called "EventGraph", so add_graph_node / connect_pins can target it directly with graph_name="EventGraph". This is the entry point for level-specific scripting that does not belong in any actor. Read-only by default: with create=false and no blueprint present it answers exists:false + success:true rather than failing.

Parameter Type Required Description
create boolean no Optional bool (default false). True creates the Level Blueprint if the level has none -- a mutation that dirties the map, so save_level afterwards.

Returns: { exists: true, created: bool, blueprint_path: string, blueprint_name: string, event_graph: "EventGraph", level_name: string, success: true }, or, when no blueprint exists and create=false: { exists: false, success: true, level_name: string, note: string }

get_media_info

Read-only

Read a media asset by path: class and media_type ("MediaPlayer", "MediaTexture", "FileMediaSource" or "Other"), plus play_on_open and loop for a player, the linked player and auto_clear for a texture, or file_path for a file source. Read-only.

Parameter Type Required Description
asset_path string yes Path of a UMediaPlayer, UMediaTexture or UFileMediaSource asset, e.g. "/Game/Media/MP_Intro"; any other asset reports only its name and class.

Returns: { asset_path, asset_name, class, media_type, play_on_open, loop, has_media_player, media_player_path, auto_clear, file_path }

get_message_log_entries

Read-only

Read back the messages currently in a named engine Message Log listing (IMessageLogListing::GetFilteredMessages), each resolved back to the actor/component the engine attached to it. The reader that pairs with add_message_log_entry/clear_message_log.

Parameter Type Required Description
log_name string yes The message log listing name (e.g. "PIE", "MapCheck", or a custom name). Required.
severity string no Optional severity filter: "Error"|"PerformanceWarning"|"Warning"|"Info" (case-insensitive). Omit for all.
base_libraries array no Package roots to classify each entry's class against (optional, default: the project's Read Only Content Roots). An explicit [] disables the classification. Reported as data in class_root/class_root_is_base_library; the tool never judges which root is "upstream".

Returns: { log_name: string, severity_filter: string|null, base_libraries: [string], entries: [{message: string, severity: string, token_source: string, object_path: string, object_resolved: bool, actor_name: string, actor_label: string, actor_path: string, actor_class: string, actor_guid: string, component_name: string, class_asset_path: string, class_root: string, class_root_is_base_library: bool}], count: int }

get_output_log_lines

Read-only

Read the single per-editor-session log buffer UEAgent attaches to GLog (general editor output, not PIE-only -- Serialize() captures every category/verbosity that passes through GLog, regardless of PIE state; usable for PIE Functional Test / wait_for_pie_completion orchestration too). NON-DESTRUCTIVE cursor read (since_sequence_id, same idiom as poll_gameplay_messages), structured entries. Supports all three filters (message text, verbosity level, category).

Parameter Type Required Description
count integer no Optional int32 cap on the number of entries returned (default 200, max 4096).
filter string no Optional case-insensitive substring on the message text.
level_filter string no Optional exact verbosity name filter (Fatal|Error|Warning|Display|Log|Verbose|VeryVerbose), case-insensitive.
category_filter string no Optional case-insensitive substring on the log category name.
since_sequence_id number no Optional int64 cursor; only entries with a higher sequence_id are returned (default 0 = everything currently retained).

Returns: { lines: [{sequence_id, ts, level, category, message}], count, held_total, last_sequence_id }

get_python_status

Read-only

Reports whether the editor Python plugin is loaded, available, configured and initialized, with the interpreter path and engine version; when Python is initialized it also evaluates sys.version for python_version (empty otherwise). Changes nothing; check it before execute_python or execute_python_file.

No parameters.

Returns: { engine_version, module_loaded, python_available, python_configured, python_initialized, interpreter_path, python_version }

get_scalability_levels

Read-only

Read the engine's live scalability quality levels (Scalability::GetQualityLevels, the sg.* groups of the editor session) without changing anything: one level per group, 0 Low, 1 Medium, 2 High, 3 Epic, 4 Cinematic, except ResolutionQuality, which is a screen percentage; single_quality_level is the shared level when every group agrees and -1 when they differ (custom). Use it before and after set_scalability_quality, which changes one group or all; for a single sg.* or r.* console variable use get_cvar; for frame rate under those settings use get_fps_info. These are the editor's current settings, not a per-platform device profile or a saved user setting. Takes no parameters and does not fail.

No parameters.

Returns: { ResolutionQuality: int, ViewDistanceQuality: int, AntiAliasingQuality: int, ShadowQuality: int, GlobalIlluminationQuality: int, ReflectionQuality: int, PostProcessQuality: int, TextureQuality: int, EffectsQuality: int, FoliageQuality: int, ShadingQuality: int, LandscapeQuality: int, single_quality_level: int }

get_selected_actors

Read-only

Read what is selected in the editor viewport/outliner right now: each actor's JSON plus the count and the world it belongs to. Use it to act on "what the user just clicked" without asking for names, and as the read-back for select_actors / deselect_actors. Editor world only, and remember that delete_actor, duplicate_actor, copy_actors and move_actors_to_level all MUTATE the selection as a side effect -- read it before those, not after.

No parameters.

Returns: { selected_actors: [actor JSON], selected_count: int, world_name: string }

get_selected_assets

Read-only

Read what is selected in the primary Content Browser right now: each asset's path, package, name and class, plus the selected folders. Use it to act on "the assets the user just clicked" without asking for paths, and as the read-back for sync_content_browser_to_assets. Nothing is loaded. Without a Content Browser (headless editor, or every browser tab closed) the lists are empty and has_content_browser is false.

Parameter Type Required Description
include_folders boolean no Optional bool (default true): also report the selected folders of the asset view and of the path tree.

Returns: { assets: [{ asset_path: string, package_name: string, asset_name: string, asset_class: string }], count: int, folders: [string], path_view_folders: [string], has_content_browser: bool }

get_struct_members

Read-only

List the members of a user-defined struct (UUserDefinedStruct) with their type, default value, and flags. The reader that pairs with add_struct_member.

Parameter Type Required Description
struct_path string yes Full asset path of the UUserDefinedStruct (e.g. /Game/Blueprints/MyStruct).

Returns: { struct_path: string, member_count: int, members: [ { name: string, var_name: string, guid: string, category: string, sub_category?: string, sub_category_object?: string, container_type: string, default_value: string, current_default_value: string, tooltip?: string, edit_on_instance: bool, save_game: bool } ] }

get_transaction_history

Read-only

Read the editor's undo buffer as a list, most-recent-first: each entry's title, context, primary object and whether it has already been undone. Use it to answer "what changed the editor recently, and was it me" -- including edits made by the human in the UI -- before you undo anything or blame a tool for a state you did not expect. Pure read; get_undo_state gives the counts-only summary.

Parameter Type Required Description
max_entries integer no Max entries to return, newest first (default 50, clamped to 1..500).

Returns: { count: int, entries: [{ queue_index: int, title: string, context: string, is_transient: bool, primary_object: string, is_undone: bool }] }

get_undo_state

Read-only

One call that answers everything you need before touching undo/redo: both counts, both next-entry LABELS, why undo or redo is impossible right now, and whether a transaction is still OPEN (transaction_open -- the thing that silently swallows later edits into someone else's batch). Read it BEFORE undo so you know what you are about to revert.

No parameters.

Returns: { can_undo: bool, can_redo: bool, undo_reason?: string (why not, when can_undo is false), redo_reason?: string (why not, when can_redo is false), undo_count: int (entries undo can still revert), redo_count: int (undone entries redo can restore), next_undo: string, next_redo: string, transaction_open: bool, transaction_index: int }

get_viewport_state

Read-only

Read the active level editor viewport (the focused one, else the first) without changing it: realtime (the effective value, an override such as the background throttle included), view mode name and index, camera speed, camera location [x, y, z] and rotation [pitch, yaw, roll], and the Grid, Bounds, Collision, Wireframe and Lighting show flags, a flag this engine lacks left out. view_mode names every engine view mode by its display name without spaces (Lit, CSGWireframe, PlayerCollision...), or ViewMode_<index> for a value the engine does not name; set_viewport_settings takes that name back, but refuses the modes that need a choice made with them. It also reads the perspective FOV, the near clip plane and far clip override, the exposure, the view type (perspective or an orthographic view) and whether cinematic tools may possess the viewport. No viewport is an error; nothing is saved or recorded for undo. Setters: set_viewport_settings.

No parameters.

Returns: { realtime: bool, view_mode_index: int, view_mode: string, camera_speed: number, location: [number], rotation: [number], show_flags: object, fov: number (current perspective FOV, degrees), near_clip_plane: number (effective, cm), far_clip_plane_override: number (< 0 when no override is engaged), exposure: { fixed: bool, ev100: number }, view_type: string, view_type_index: int, allows_cinematic_control: bool }

import_font_file

Destructive

Import a .ttf/.otf/.ttc/.otc font from disk as a UFontFace, and optionally the companion UFont that a FSlateFontInfo needs to actually render text. This is the only way to get a typeface into the project headlessly: import_texture_file imports images only, and nothing else in the toolset touches fonts. Drives UFontFileImportFactory inline (never IAssetTools::ImportAssets, which asserts when re-entered from the engine tick) and never lets the factory ask: left at its default it pops a MODAL DIALOG asking whether to create the UFont, which would hang the editor on a click that is never coming, so on UE 5.8 BatchCreateFontAsset is set explicitly and on 5.7 the import runs as automated and the UFont is created by the tool. Once imported, point a widget at it with set_widget_property on the dotted path "Font.FontObject" (a UFont) plus "Font.TypefaceFontName", or "Font.Size" for the size.

Parameter Type Required Description
source_file_path string yes Absolute path on disk to the .ttf/.otf/.ttc/.otc file. A missing file, or any other extension, is a clean error before anything is touched.
destination_path string yes UE long path of the destination content folder, e.g. /Game/MyGame/UI/Fonts.
name string no Optional asset name; defaults to the source file's base name.
create_font_asset boolean no Also create the companion UFont asset (default true). A UFontFace alone is a raw typeface: a FSlateFontInfo's FontObject wants a UFont. Pass false to import only the face, e.g. to add it as another typeface entry of an existing font.

Returns: { source_file_path, destination_path, imported_object_path, font_face_created, create_font_asset, message }

Destructive Idempotent

Bind a UMediaTexture asset to a UMediaPlayer asset (both by asset path) so the texture shows that player's video, in place of any player it was bound to, in one undo step; then save the texture package (the player asset is not modified). The link is written to the texture's saved MediaPlayer property, so it survives a reload; linked confirms both that property and the player the texture now reports (bound_player_path), and a link that did not take is an error with linked false and nothing saved. Idempotent: linking the same pair again writes and saves the same state. A missing texture or player is an error; a failed save makes success false with saved=false and save_error. Create the assets with create_media_texture and create_media_player (which can also make a linked texture); read back with get_media_info.

Parameter Type Required Description
media_texture_path string yes Asset path of the UMediaTexture, e.g. "/Game/Media/T_Intro" (the object path form also works).
media_player_path string yes Asset path of the UMediaPlayer to bind, e.g. "/Game/Media/MP_Intro" (the object path form also works).

Returns: { media_texture_path, media_player_path, linked, saved, bound_player_path?, save_error? }

list_automation_tests

Read-only

List the automation tests registered in this editor without running any: per test its display name, full_test_path, test_name, tags, parameter, source file and line, and participants required. Engine, product and performance tests are listed too, not only smoke tests: the call widens the framework's test filter to every flag and loads the modules that register tests, but changes no asset or level. Tests are returned in registry order up to max_results; total_count counts every registered test, matched_count those the filter matches, and truncated is true when matches were cut off, so narrow the filter or raise max_results. Use it to find the name for run_automation_test; run_smoke_tests runs the smoke set and get_automation_test_results re-reads the last result.

Parameter Type Required Description
filter string no Optional case-insensitive substring matched against the full test path, e.g. 'UEAgent.' or 'Project.Functional'; empty lists every test.
max_results number no Most tests to return, a positive number (default 500); 0 or a negative value also means 500.

Returns: { display_name, full_test_path, test_name, test_tags, test_parameter, source_file, source_file_line, num_participants_required, tests, total_count, matched_count, returned_count, max_results, truncated, filter }

list_cvars

Read-only

List the console variables registered in the running editor whose name contains filter and/or starts with prefix, each with its current value as text and its help, without changing anything. Console commands are left out unless include_commands is true (they come with help but no value); with neither filter nor prefix every variable is walked. The list stops at max_results, and truncated plus total_matches tell how many more matched. Use it to discover names; then read one in full (int, float and bool values, flags, set_by) with get_cvar, change it with set_cvar or several at once with set_cvars_from_json, and read the scalability groups with get_scalability_levels. Matching nothing is a success with an empty cvars list.

Parameter Type Required Description
filter string no Text the name must contain, case ignored, e.g. "Shadow" (default empty = no filter). Without prefix, space-separated words must all appear and a single character matches as a name prefix; with prefix, a name must start with prefix and contain the whole filter.
prefix string no Text the name must start with, case ignored, e.g. "r.Shadow." or "t." (default empty = any name).
include_commands boolean no true to also list console commands (name and help, no value); default false lists variables only.
max_results integer no Most entries to return, a whole number of at least 1 (default 200); total_matches still counts every match.

Returns: { filter: string, prefix?: string, include_commands: bool, cvars: [{name, value?, help}], count: int, total_matches: int, max_results: int, truncated: bool }

list_dirty_packages

Read-only

Pack levels: enable_toolset adds it to a client's list (tool lists).

What is UNSAVED in the editor right now: every dirty package with its disk path, split into map / OFPA-external / asset, and -- the reason to run it -- readonly_dirty_count, the single go/no-go number telling you a vendored root like /Game/VendorPack would be REWRITTEN by the next bulk save. Run it before closing the editor, before compiling, and before any save; it also resolves OFPA hashes to actor labels so /ExternalActors/AB/CD/EF12 becomes a name. Strictly read-only: never marks dirty, never saves. WARNING: it reports IN-MEMORY state only -- a package clean here can still differ from HEAD on disk, so git status stays the disk authority. And do NOT use its pie_active field as the PIE gate: it can answer false with PIE running; the oracle is is_play_in_editor_active.

Parameter Type Required Description
readonly_roots array no Optional array of long-path prefixes treated as vendored/upstream (default: the project's Read Only Content Roots). Only used to CLASSIFY (under_readonly_root / readonly_dirty_count); nothing is ever written. Pass [] to switch the classification off.
path_prefix string no Optional long-path prefix filter, e.g. /Game/VendorPack, to ask "is anything of THEIRS dirty". Empty (default) lists everything; what it excluded is counted in filtered_out.
include_objects boolean no Optional bool (default false). Also list every object carried by each dirty package. One object-hash walk per package -- a dirty map can hold thousands, so leave it off unless you need the contents.
offset integer no Index of the first entry returned, counted from 0 (default 0). Read the next page at the reply's next_offset.
limit integer no Most entries returned per call, 1..1000 (default 100).

Returns: { dirty_count: int (every dirty package, not only this page), readonly_dirty_count: int, map_dirty_count: int, external_dirty_count: int, asset_dirty_count: int, filtered_out: int, pie_active: bool, current_world_package: string, path_prefix: string, readonly_roots: [string], readonly_roots_defaulted: bool, packages: [{ package_name: string, file_path: string, exists_on_disk: bool, kind: string, contains_map: bool, newly_created: bool, actor_label: string, actor_name: string, asset_name: string, asset_class: string, under_readonly_root: bool, objects?: [string] }] (sorted by package_name), message: string, note: string, total: int, offset: int, limit: int, returned: int, truncated: bool, next_offset: int|null }

list_engine_ini_sections

Read-only

List the section names of one INI (Engine, Game, Input, Editor, Scalability...) without changing anything: by default as the running editor holds it in GConfig, the in-memory merge of every config layer (the engine's Base ini included); with include_base=false only the sections the project itself defines, read from disk in its Config/Default<name>.ini and its saved Saved/Config/<Platform>/<name>.ini (files_read lists the ones that exist). An INI GConfig does not know (a misspelt name, say) is a success with found=false. Use it to discover a section before reading one key with get_engine_ini_value or writing one with set_engine_ini_value; for UDeveloperSettings classes use get_project_settings_value. file_path is the saved-config path Saved/Config/<Platform>/<name>.ini built from the name.

Parameter Type Required Description
config_file string no INI base name, e.g. "Engine" (default), "Game", "Input", "Editor", "Scalability"; a trailing ".ini" is dropped.
include_base boolean no true (default) lists the whole in-memory merge, engine Base ini layers included; false lists only the sections in the project's Config/Default<name>.ini and Saved/Config/<Platform>/<name>.ini, as they are on disk.
offset integer no Index of the first entry returned, counted from 0 (default 0). Read the next page at the reply's next_offset.
limit integer no Most entries returned per call, 1..1000 (default 100).

Returns: { count (entries in this page), sections: [string] (sorted by name), found: bool, include_base: bool, config_file, file_path, files_read?: [string], total: int, offset: int, limit: int, returned: int, truncated: bool, next_offset: int|null }

list_open_asset_editors

Read-only

List the asset editors open right now and the assets each one edits, with whether each asset has unsaved changes. Use it to see what the user is working on, or to find editors to close with close_asset_editor. Read-only; nothing is loaded.

No parameters.

Returns: { editors: [{ editor_name: string, is_primary_editor: bool, assets: [string] }], editor_count: int, assets: [{ asset_path: string, asset_class: string, dirty: bool, editor_names: [string] }], asset_count: int }

load_level

Destructive

Pack levels: enable_toolset adds it to a client's list (tool lists).

Open a map in the editor (by /Game or /Engine package path, or disk .umap), replacing the current world; default_template=true opens the engine's default template level instead (/Engine/Maps/Templates/Template_Default, ~45 actors: floor, PlayerStart, sky and lights), after which a save_level without filename would write over the ENGINE's own map (is_engine_template and warning say so). Also the repair for actors that VANISHED from a world in memory after compile_blueprint: reloading the same map brings the placed OFPA instances back with their per-instance config -- never re-place them. REFUSES up front when any other UWorld is still resident in memory, because the engine's world-leak check turns that into a Fatal error that kills the editor process and every unsaved edit with it; the refusal lists the resident worlds and the remedy. Run list_dirty_packages first: a reload discards unsaved work. Refused while a test started by run_automation_test or run_functional_test_in_pie runs.

Parameter Type Required Description
filename string no Disk path to a .umap, OR a long package path (e.g. /Game/Maps/Foo) resolved to the on-disk map file. Required unless default_template is true.
default_template boolean no Optional bool (default false): open the engine's default template level (/Engine/Maps/Templates/Template_Default) without naming it in filename; giving both is an error.
load_as_template boolean no When true, loads the level as a template; defaults to false
force boolean no Skip the resident-world preflight and call LoadMap anyway. With resident worlds alive this PROBABLY KILLS THE EDITOR: the engine raises a Fatal error ("World Memory Leaks"), the process dies and every unsaved in-memory edit is lost. Defaults to false.

Returns: { success: bool, error?: string, refused?: bool, load_attempted?: bool, resident_world_count?: int, resident_worlds?: [{ package: string, world_name: string, world_type: string, has_world_context: bool, is_load_target: bool }], remedy?: string, data?: { loaded_filename: string, target_package: string, default_template: bool, level_name?: string, world_name?: string, loaded_package?: string, is_engine_template?: bool, warning?: string (when the loaded map belongs to the engine), resident_world_count: int, forced_past_resident_worlds: bool, resident_worlds?: [...] } }

migrate_assets

Destructive

Copy assets, and their dependencies unless ignore_dependencies, into another project's Content folder with IAssetTools::MigratePackages, with no prompt and skipping files that already exist there. The engine first saves every dirty package of this editor, and migrates nothing if one of them fails to save. What was copied is measured from the migration's own package list against the disk: migrated lists each package written (dependencies included), skipped_existing the requested ones the destination already had, failed the requested ones neither written nor skipped. Succeeds when nothing requested failed. destination_path must be a Content folder with a .uproject (or one .uplugin) next to it, or the engine migrates nothing and the call fails.

Parameter Type Required Description
asset_paths array yes Asset object or package paths to migrate (e.g. ["/Game/Props/SM_Crate"]); each is reduced to its package name.
destination_path string yes Target content folder, e.g. D:/OtherProject/Content
ignore_dependencies boolean no When true only the listed packages are copied, without their dependencies (default false).

Returns: { migrated_count: int, failed_count: int, requested_count: int, destination_path: string, ignore_dependencies: bool, migrated: [{ package: string, file: string }], skipped_existing: [string], failed: [string], note: string? }

move_actors_to_level

Destructive Idempotent

Relocate existing editor-world actors into another sub-level (persistent or a loaded streaming level) -- it rescues actors that got spawned into the wrong level, which set_current_level only prevents going forward. Idempotent: actors already there come back in already_in_level instead of being touched. WARNING: it is clipboard-backed, so the editor SELECTION is mutated as a side effect, and the destination must be loaded AND unlocked. Both levels' packages get dirty: save_level after.

Parameter Type Required Description
actor_names array yes Array of actor names OR editor labels in the editor world (this one does accept labels, unlike delete_actor/delete_actors).
target_level string yes "persistent" or the short name of a loaded streaming sub-level
move_all_or_fail boolean no When true, fail the whole move if any actor cannot be moved; defaults to false

Returns: { requested: int, moved_count: int, already_in_level: [string], target_level: string, success: bool, note: string }

open_asset_editor

Additive Idempotent

Open the editor for an asset (Blueprint, material, data table...) the way a double-click in the Content Browser does, loading the asset if needed, or bring its editor to the front when it is already open. The outcome is read back: success only when an editor for the asset is open after the call. Maps are refused (opening one loads it as the level: use load_level), and so is a headless editor, which cannot show an editor window.

Parameter Type Required Description
asset_path string yes Required: object path ('/Game/A/B.B'), package path ('/Game/A/B') or an unambiguous bare asset name.
focus boolean no Optional bool (default true): bring the editor to the front when it is already open.

Returns: { asset_path: string, asset_class: string, opened: bool, already_open: bool, editor_name: string, is_primary_editor: bool }

open_message_log

Additive Idempotent

Open or focus the editor Message Log window on one listing (PIE by default), creating the listing empty when it does not exist yet and enabling message log display; no message is changed. opened only says the request was made: without an editor UI nothing shows. module_available says whether the MessageLog module loaded. To read the messages use get_message_log_entries rather than the window; add or empty them with add_message_log_entry and clear_message_log.

Parameter Type Required Description
log_name string no Listing to surface (default "PIE").

Returns: { opened: bool, log_name: string, module_available: bool }

paste_actors

Destructive

Drop whatever copy_actors left on the editor clipboard into the current level (edactPasteSelected), optionally re-centring the whole group on a world location while KEEPING each actor's relative offset -- that is the point of the copy/paste pair versus duplicate_actor. The pasted actors end up selected and are returned with their new names and transforms. Editor world only; they live in memory until save_level writes the .umap.

Parameter Type Required Description
location array no Optional world point to centre the pasted group on, ARRAY form only [x, y, z] (the group's average is moved there, each actor's offset preserved). Omit to paste where the originals were; any other value (an object, another length) is an error and nothing is pasted.

Returns: { pasted_actors: [actor JSON with the new auto-assigned names], pasted_count: int, success: bool }

Additive

Write one line to the editor Output Log under the LogTemp category, at Log, Warning or Error verbosity; verbosity is matched without case, anything else logs at Log, and the reply's verbosity is the level actually used. An empty or missing message is an error. Each call appends another line, so it is not idempotent, and nothing else changes: no asset, no undo step, no Message Log entry; like any UE_LOG line it also reaches the editor log file. Use it to mark a point in the log between other calls; read lines back with get_output_log_lines; a listing in Window > Message Log is add_message_log_entry, an on-screen toast show_notification.

Parameter Type Required Description
message string yes The text to log; empty is an error.
verbosity string no UE_LOG verbosity: "Log" (default), "Warning", "Error"; matched without case, and any other value logs at Log.

Returns: { logged: bool, message: string, verbosity: string }

redo

Destructive

Re-apply the transaction that undo just reverted, or count of them, and report what remains, including next_redo. WARNING: success is ALWAYS true even with an empty redo stack -- read applied instead, and with a count compare actually_redone against requested. Note the redo stack is discarded as soon as any NEW edit is made after an undo, so a redo that answers applied:false usually means something was changed in between, not that the command failed.

Parameter Type Required Description
count integer no Optional. How many transactions to redo, at least 1 (default 1); stops early when the redo stack runs out. Below 1 is refused.

Returns: { applied: bool (THE oracle), requested: int, actually_redone: int (compare against requested), undo_count: int, can_redo: bool, next_redo: string (label of the next redoable entry) }

reload_asset_package

Destructive

Re-read already-loaded packages FROM DISK, non-interactively (it never opens the modal that would freeze a headless editor), either preserving or permanently discarding their in-memory edits. This is the repair for the situation list_dirty_packages flags: a vendored package left dirty by a compile cascade is cleaned with on_dirty="discard" (was_dirty:[...] -> still_dirty:[]), so the next bulk save cannot write it. Also the way to throw away a bad in-memory edit without touching disk. It reports before/after evidence per package, and skips what it cannot safely reload (not loaded, OFPA, worlds) instead of pretending. WARNING: on_dirty="discard" is irreversible for unsaved work -- check what is dirty first.

Parameter Type Required Description
package_names array no Array of long package names (or object paths) to reload, e.g. ["/Game/VendorPack/.../DT_ItemRows"].
package_name string no Convenience single-name alias for package_names.
on_dirty string no Optional "abort" (default) or "discard". "abort" -> EReloadPackagesInteractionMode::AssumeNegative: a package with unsaved in-memory edits is NOT reloaded and its edits are kept. "discard" -> AssumePositive: UPackageTools clears the dirty flag and reloads, PERMANENTLY THROWING AWAY those in-memory edits.

Returns: { requested: [string], on_dirty: string, interaction_mode: string, attempted: [string], reloaded: [string], was_dirty: [string], still_dirty: [string], failed: [string], skipped_not_loaded: [string], skipped_ofpa: [string], skipped_world: [object], skipped_invalid: [object], api_returned: bool, api_error: string, verify: { before: [object], after: [object] }, message: string }

remove_component_from_actor

Destructive

Detach and destroy one component from an actor PLACED in the level, by component name -- the inverse of add_component_to_actor and, like it, an instance-level edit that does not touch the actor's Blueprint (use remove_component_from_blueprint for the class). Discover the exact component_name with get_actor_components first. Editor world only; dirties the actor's package, so save_level to keep it.

Parameter Type Required Description
actor_name string yes Name of the placed actor (editor world).
component_name string yes Exact component name as reported by get_actor_components.

Returns: { actor_name: string, removed_component: string, component_type: string, success: bool }

remove_enum_entry

Destructive Idempotent

Remove one enumerator from a Blueprint Enum by display name (or internal name). Idempotent (a missing entry reports already_absent without error); refuses to remove the last remaining entry. The hidden _MAX sentinel is never counted or removable.

Parameter Type Required Description
enum_path string yes Full asset path of the UUserDefinedEnum.
entry_name string yes Enumerator to remove, by display name (or internal name).

Returns: { enum_path: string, entry_name: string, removed: bool, already_absent: bool, entry_count: int }

remove_struct_member

Destructive Idempotent

Remove one member from a Blueprint user-defined struct, found by display name or else by internal var name (case-insensitive), through the engine's struct editor: one undo step, the struct is recompiled so the Blueprints and DataTable rows that use it lose that field, and the package is marked dirty but not saved (save_asset). Idempotent: a member that is not there changes nothing and answers already_absent true. Removing the last member is refused, since a struct cannot be empty, and nothing changes; a path that does not load as a user-defined struct is an error. Find the names with get_struct_members; inverse: add_struct_member; to keep the data under another name use rename_struct_member instead.

Parameter Type Required Description
struct_path string yes Asset path of the user-defined struct, e.g. "/Game/Data/S_Item", as get_struct_members takes it.
member_name string yes Member to remove, by its display name as get_struct_members returns it (members[].name) or by its var_name; case-insensitive.

Returns: { struct_path: string, member_name: string, removed: bool, already_absent: bool, member_count: int }

remove_undo_barrier

Destructive

Lift the most recent undo barrier so undo can step past it again -- the counterpart of set_undo_barrier, for when the protected batch is finished -- or, with all=true, every barrier at once (including ones another session or the human placed to protect their work). Nothing is undone; it only lifts the floor. A single pop with no barrier to lift fails; all=true with none succeeds with removed:false and a note, since clearing nothing is not a failure.

Parameter Type Required Description
all boolean no Optional bool (default false). true clears ALL undo barriers instead of popping the most recent one.

Returns: { success: bool (false for a single pop with no barrier), removed: bool (false = there was no barrier), all: bool (echo), undo_barrier: int now in force (-1 = none), undo_count: int, queue_length: int, note?: string }

rename_enum_entry

Destructive Idempotent

Rename one enumerator of a Blueprint Enum (UUserDefinedEnum): resolve the entry by its current display name (or internal name) to its index, then set a new display name via FEnumEditorUtils::SetEnumeratorDisplayName. Idempotent: renaming an entry to the name it already has is a no-op success (already_named). An unknown current entry is an honest error; so is a new name that is empty/invalid or duplicates another entry's display name (the engine's IsEnumeratorDisplayNameValid rejects it). The hidden _MAX sentinel is never addressable.

Parameter Type Required Description
enum_path string yes Full asset path of the UUserDefinedEnum (e.g. /Game/Blueprints/MyEnum).
entry_name string yes Enumerator to rename, by its current display name (or internal name).
new_name string yes New display name for the enumerator.

Returns: { enum_path: string, entry_name: string, new_name: string, renamed: bool, already_named: bool, index: int, entries: [string] }

rename_struct_member

Destructive Idempotent

Rename a member of a user-defined struct by resolving its current display name to its stable VarGuid, then applying the new display name (the same FStructureEditorUtils::RenameVariable path add_struct_member uses to set the initial name). Idempotent: renaming a member to the name it already has is a no-op success (already_named). An unknown current member, or a new name that collides with another member's name, is an honest error.

Parameter Type Required Description
struct_path string yes Full asset path of the UUserDefinedStruct.
member_name string yes Member to rename, by its current display name (or internal var name).
new_name string yes New display name for the member.

Returns: { struct_path: string, member_name: string, new_name: string, renamed: bool, already_named: bool, member: object }

reorder_enum_entry

Destructive

Move one enumerator to a new position in a Blueprint Enum, shifting the others (e.g. [A,B,C,D] move B->index 2 = [A,C,B,D]). to_index is clamped to the user-entry range (the trailing _MAX sentinel is excluded). An unknown entry is an honest error.

Parameter Type Required Description
enum_path string yes Full asset path of the UUserDefinedEnum.
entry_name string yes Enumerator to move, by display name (or internal name).
to_index integer yes Target zero-based position among the user entries.

Returns: { enum_path: string, entry_name: string, from_index: int, to_index: int, moved: bool, entries: [string] }

reset_transaction_buffer

Destructive Idempotent

IRREVERSIBLE: wipes the editor's ENTIRE undo AND redo history (the human's entries too, not just yours) and drops any open transaction. It does not revert anything -- edits already made stay made, they just stop being undoable. Use only to reclaim memory after a huge batch, or when a corrupt buffer is causing trouble; to undo work use undo (with count for several steps). undo_count_before vs after is the evidence.

Parameter Type Required Description
reason string no Human-readable reason, logged by the engine so the wipe is traceable. Defaults to 'MCP reset_transaction_buffer'.

Returns: { success: bool (false when entries remain in the buffer), undo_count_before: int, undo_count_after: int (0), queue_length_after: int (0) }

run_automation_test

Destructive

Run ONE registered automation test in this editor and return its verdict (pass, fail or skipped) with its errors, warnings and log entries; a test that needs several ticks (PIE, a map load, a wait) answers verdict running instead and goes on after the reply. Find the name first with list_automation_tests; run every smoke test at once with run_smoke_tests.

A test whose work fits in this call answers its verdict here. A latent one keeps running across ticks: poll get_automation_test_results until running is false for its verdict and entries, or stop it with cancel_automation_test; one that outlives timeout_seconds is stopped with timed_out true. While it runs, a second test, start_play_in_editor, stop_play_in_editor and load_level are refused with a message naming it, and wait_for_pie_completion must not be called (it blocks the ticks the test needs). A latent test is refused while the open level has unsaved changes, since a test that opens a map discards them: save first, or pass force=true.

A test that needs an interactive user, or a real renderer in a headless editor, is answered skipped with the reason; a test started outside UEAgent that is still running, or an editor busy with a slow task, refuses the start. Marked destructive and not idempotent because the test's own code runs in the editor and can create, change or delete assets and actors as it was written to; this tool itself saves nothing and adds no undo step for what the test did.

Parameter Type Required Description
test_name string yes The test's test_name or its full_test_path, exactly as list_automation_tests gives them (e.g. "UEAgent.ClaudeCode")
timeout_seconds number no Optional number (default 300): a latent test still running after this many seconds is stopped, with timed_out true in get_automation_test_results.
force boolean no Optional bool (default false): run a latent test even though the open level has unsaved changes, which a test that opens a map discards.

Returns: { test_name, started, completed, running?, passed?, verdict: "pass"|"fail"|"skipped"|"running", duration_s?, errors?, warnings?, entries?:[{type,message,context,filename,line}], entry_count?, timeout_seconds?, note? }

run_functional_test_in_pie

Destructive

Run a Functional Test Blueprint in a Play-in-Editor session: the call answers verdict running; poll get_functional_test_status until running is false, for verdict pass, fail, unknown (finished with Default) or not_run, and timed_out past timeout_seconds or the test's Time Limit.

With no session, it starts one (with a player) and calls RunTest on the test's instance in the play world, copied from the editor level or spawned there; this session is ended when the test ends unless auto_stop_pie=false. A running session is used and never ended; one still starting is refused (retry once is_play_in_editor_active is true).

A spawned actor is removed when the test ends; keep_actor=true places it in the editor level instead (unsaved, no undo). While the test runs, a second test, start_play_in_editor, stop_play_in_editor and load_level are refused, cancel_automation_test stops it, and wait_for_pie_completion must not be called (it blocks the ticks the test needs). A class not found, not a Functional Test, or matching several loaded classes is an error (create_functional_test makes one).

Parameter Type Required Description
test_asset_path string yes Functional Test Blueprint, as an asset path ("/Game/Tests/BP_FT_PlayerHealth", as create_functional_test returns it), object path or generated-class path ("/Game/Tests/BP_FT_PlayerHealth.BP_FT_PlayerHealth_C"); when none loads, a loaded Functional Test class named exactly like the last path segment (with or without _C) is used.
auto_stop_pie boolean no Optional bool (default true): end the Play session this call requests once the test has ended; false leaves it running. A session that was already running is never ended.
timeout_seconds number no Optional number (default 120): a test still running after this many seconds is finished as Failed, with timed_out true.
keep_actor boolean no Optional bool (default false): place the test in the editor level and leave it there; by default it only exists in the session.

Returns: { test_asset_path, test_class, verdict: "running", test_result?, test_in_session, already_in_pie, pie_requested, pie_started, pie_stop_scheduled, spawned, already_in_world, keep_actor, timeout_seconds, note }

run_smoke_tests

Destructive

Runs every registered automation test with the smoke filter, synchronously in the editor, and returns only the aggregate: ran, all_passed and a note. Under a commandlet the engine skips them, so ran and all_passed come back false. Refused while run_automation_test or run_functional_test_in_pie has a test running. For one test with its log entries use run_automation_test.

No parameters.

Returns: { ran, all_passed, note }

save_asset

Destructive Refused during PIE

Core tool: every client lists it by default.

Write one asset's package to disk by its path and verify the result: still_dirty_after_save false and file_on_disk true are the proof, not saved.

Use it after an edit you want to keep, because most edit tools change the asset in memory only. save_level writes a level's .umap, and reload_asset_package throws an unsaved edit away instead. It writes exactly one package: a compile can dirty others, so run list_dirty_packages before a bulk save and read git status after.

path takes the path or the package that find_assets_by_name returns, as in {"path": "/Game/Core/BP_Door"}. readonly_roots chooses which folders count as vendored, and refuse_readonly whether a save under them is refused or only reported; leave both out to use the project's Read Only Content Roots, which refuse.

Refused during Play-in-Editor, where the engine would drop the write and still report success (see force). When a save fails otherwise, file_read_only says whether the file is read-only on disk (usually a Git LFS lockable file nobody has locked), and the error says whether that is the cause.

Parameter Type Required Description
path string yes Full asset path to save, e.g. /Game/MyGame/Core/BP_MyActor (an .Object suffix is tolerated). Must already exist or the call errors.
readonly_roots array no Optional array of long-path prefixes treated as vendored/upstream (default: the project's Read Only Content Roots). A save under one of them is REFUSED by default; see refuse_readonly. Pass [] to disable the classification entirely.
refuse_readonly boolean no Optional bool. When true, a save whose package falls under one of readonly_roots is REFUSED (success:false, saved:false, refused_readonly:true) instead of performed. Default = the process-wide switch (mcp_common::IsReadOnlyRootSaveEnforcementEnabled(), true unless mcp.ReadOnlyRootEnforcement 0); when false the write happens and is only reported + ledgered.

Returns: { path: string, package_name: string, saved: bool, success: bool, under_readonly_root: bool, readonly_root_matched: string, refused_readonly: bool, readonly_roots: [string], readonly_roots_defaulted: bool, still_dirty_after_save: bool, file_on_disk: bool, file_read_only: bool, verification: object, verification_checks: [object], error?: string }

save_level

Destructive Refused during PIE

Pack levels: enable_toolset adds it to a client's list (tool lists).

Write the editor's current level (.umap) to disk; it REFUSES while PIE is running (the engine guard rejects the write anyway) and derives success from the file being on disk afterwards, never from the save call's own bool. WARNING: it also REFUSES when the target .umap is READ-ONLY on disk, which in an LFS repo means a lockable path you have not git lfs locked: that write cannot succeed, and answering over HEAD's still-untouched bytes would report success:true having written nothing. The refusal names the file and the fix (git lfs lock <file>) -- take the lock, do not retry. WARNING: on a file that ALREADY existed, file_exists_on_disk alone still cannot tell "I wrote it" from "it was already there": the field that proves the write is file_mtime_changed. It is deliberately NOT gating success, because a save with nothing dirty to write also leaves the mtime alone and that is not a failure. WARNING: with filename this is a SaveAs that DUPLICATES: the editor stays on the old map, the new one becomes a resident world (which then makes load_level refuse), and a SECOND save to the same filename opens a modal that freezes the editor -- treat filename as one-shot per name per session.

Parameter Type Required Description
filename string no Optional. A /Game asset path (e.g. /Game/Maps/Foo) or a disk .umap path; both accepted and resolved. Omit it to save the level in place -- that is the branch that just works. Passing one is a SaveAs: duplicate + resident world + the one-shot rule above.
save_as string no Accepted for wire compatibility and IGNORED: the branch is chosen by whether filename was given. It comes back inside requested to mark it as your input, not a measurement.

Returns: { success: bool, error?: string, data?: { saved_filename?: string, saved_package?: string, saved_disk_path?: string, level_name?: string, file_exists_on_disk: bool, file_size_bytes: int, file_existed_before: bool, file_mtime_changed: bool (the write itself -- see the read-only note above), save_call_returned: bool, rescued_with_save_packages: bool, pie_was_stopped: bool, orphan_world_risk?: bool, requested?: { filename?: string, save_as?: bool } } }

select_actors

Destructive

Select actors by name in the editor viewport/outliner, appending to or replacing the current selection, and report which ones were not found. Use it to stage the input for the selection-driven tools (copy_actors with copy_selected, move_actors_to_level) or to show the user what you mean before they look. WARNING: matches INTERNAL names only (no editor labels) and misses are reported in not_found_names instead of failing, so check not_found_count. Editor world only.

Parameter Type Required Description
actor_names array yes Array of internal actor names (GetName), case-insensitive whole-string. Editor labels do NOT resolve here; convert them with find_actors_by_name.
add_to_selection boolean no Optional bool (default TRUE = append to whatever is already selected). Pass false to clear the selection first and end up with exactly these actors.

Returns: { selected_actors: [actor JSON], selected_count: int, not_found_count: int, not_found_names?: [string], add_to_selection: bool }

set_actor_transform

Destructive Idempotent

Move, rotate and/or scale ONE actor (omitted components are left as they are) and return the actor's re-read transform plus the identity of the world that was written. Undoable, and it calls Modify() first -- which matters, because moving an actor from Python does NOT dirty its OFPA package and then save_level reports success while writing nothing. Takes a world selector, so it also reaches a LIVE PIE pawn (an editor-only lookup would answer "Actor not found" for an actor that exists in another world). Use execute_batch for many actors, snap_actor_to_landscape to drop one onto the landscape.

Parameter Type Required Description
name string yes Actor's internal name (GetName) or editor label (GetActorLabel), case-insensitive whole-string match.
world string no Optional: "editor" (default) | "pie" | "server" | "client" | "pie:N". In co-op the authoritative pawn lives on the server, and a move written to the client world will be corrected by replication.
location array no Optional new WORLD location, ARRAY form only: [x, y, z]. Absolute, not a delta; any other value (an object, another length) is an error and the actor is not touched.
rotation array no Optional new WORLD rotation as the array [pitch, yaw, roll] -- note index 2 is ROLL, not yaw -- or, unambiguously, the object {"pitch":..,"yaw":..,"roll":..}, which is the recommended form.
scale array no Optional new WORLD scale, ARRAY form only: [x, y, z]. Any other value (an object, another length) is an error and the actor is not touched.

Returns: { actor JSON via DescribeActorObject, transform RE-READ off the actor after the write }

set_current_level

Destructive Idempotent

Choose which sub-level of the editor world is CURRENT, i.e. where newly spawned or pasted actors will land. Set it before spawn_actor / paste_actors when a map is split into streaming sub-levels, otherwise everything piles into whichever level happens to be active. Errors honestly if the named streaming level is not loaded/visible; already_current:true when it was already the one. Use move_actors_to_level to relocate actors that ended up in the wrong one.

Parameter Type Required Description
level_name string yes "persistent" for the persistent level, or the SHORT name of a loaded, visible streaming sub-level (not a /Game path).

Returns: { current_level: string, changed: bool, already_current: bool, success: true } -- current_level is the level current after the call; a level that is not found, or not loaded and visible, is an error instead.

set_cvar

Destructive Idempotent

Sets a console variable via IConsoleManager and reads the value back. Uses IConsoleManager::Get().FindConsoleVariable(name)->Set(value, ECVF_SetByConsole). Honest error if the named cvar does not exist (unlike a raw console Exec which silently no-ops).

Parameter Type Required Description
name string yes Console variable name, e.g. "r.ScreenPercentage", "r.Shadow.MaxResolution".
value string|number|boolean yes New value (string, number, or bool; coerced to the cvar's type).

Returns: { set: bool, requested_value: string, name: string, value: string, string_value: string, int_value: int, float_value: float, bool_value: bool, help: string, flags: int, set_by: string }

set_cvars_from_json

Destructive Idempotent

Set several console variables of the running editor in one call, from a JSON object of name/value pairs, each through IConsoleManager at SetByCode priority, then read each one back. Not atomic: names are applied one by one, and the others still apply when one fails. applied counts only the variables that hold the new value afterwards; results gives each one's read-back value and set_by. A variable last set at a higher priority (by the console or by set_cvar) ignores this write and goes to errors, as do an unknown name and a value the variable would misread; then success is false (use set_cvar, console priority, for those). Find names with list_cvars. The values live in this editor session only: nothing is written to an INI (set_engine_ini_value does that) and nothing is undoable. Text that is not a JSON object is an error and nothing changes. Repeating the call sets the same values again.

Parameter Type Required Description
cvars string yes A STRING holding a JSON object of exact cvar names to values, e.g. '{"r.ScreenPercentage":"75","t.MaxFPS":60}'; names as list_cvars returns them. A value is text, a number (passed as its text) or a bool (passed as 1/0); a numeric or bool cvar takes only a number or one of the words true/false/yes/no/on/off (as 1/0), and other text, null, an array or an object is refused for that name.

Returns: { applied, requested, results: [{name, requested_value, value, set_by, applied}], errors: [{name, error}] }

set_engine_ini_value

Destructive Idempotent

Write one key into the GConfig copy of an INI (Engine by default), flush it to the saved config under Saved/Config/<Platform>/, and verify by reading it back (applied). It does not edit Config/Default*.ini, and objects that already loaded their config are not reloaded. The value may be text, a bool or a number; with plugin_name it writes a plugin's setting, the section defaulting to the plugin's /Script/<Plugin>.<Plugin>.

Parameter Type Required Description
key string yes Key inside the section, e.g. "r.DefaultFeature.AntiAliasing"; its current value is replaced.
value string|boolean|number yes Value to write: a string written verbatim (an empty string is allowed), a JSON bool written as GConfig writes one ("True"/"False"), or a JSON number written as its text (an integer without decimals).
section string no INI section, e.g. "/Script/Engine.RendererSettings"; created when missing; surrounding brackets are dropped. Required unless plugin_name is given.
config_file string no Config base name without extension, e.g. "Engine" (default), "Game", "Input"; "Engine.ini" is not resolved.
plugin_name string no Optional plugin, as its .uplugin is named: an unknown one fails with nothing written; a known one adds its identity to the reply and makes section default to /Script/<Plugin>.<Plugin>.

Returns: { applied, section, key, value, value_type: "string"|"bool"|"number", readback_value, config_file, config_file_path, plugin_name?, plugin_status?, plugin_version?, plugin_description?, plugin_author?, plugin_category?, plugin_loaded?, plugin_enabled?, plugin_path?, plugin_file? }

set_enum_bitflags

Destructive Idempotent

Turn the "Bitflags" metadata of a Blueprint Enum (UUserDefinedEnum) on or off, as the enum editor's checkbox does: on, its enumerators can be combined as bit flags, so an integer variable marked Bitmask can use it as its Bitmask Enum. Only this flag changes; build the entries with create_enum, add_enum_entry, rename_enum_entry, reorder_enum_entry or remove_enum_entry, and read them with get_enum_info. One undo step; Blueprints that use the enum are notified, and the enum is marked dirty, not saved (save_asset). Idempotent: the state it already has reports already_set=true, applied=false, and changes nothing. A path that does not load a UUserDefinedEnum (a native C++ enum included) is an error.

Parameter Type Required Description
enum_path string yes Full asset path of the UUserDefinedEnum (e.g. /Game/Blueprints/MyEnum, the ".MyEnum" suffix optional), as create_enum returns it or find_assets_by_name finds it.
bitflags boolean yes Desired state: true to mark as bitflags, false to clear.

Returns: { enum_path: string, bitflags: bool, already_set: bool, applied: bool }

set_plugin_enabled

Destructive Idempotent

Turn a plugin on (or off, with enabled=false) in the .uproject and save the project file to disk. WARNING: enabled echoes the requested state once the .uproject write succeeded, and the plugin's MODULES are not loaded or unloaded by this call -- the editor has to be restarted before an enabled plugin's classes, assets or MCP tools actually exist, and a disabled plugin's classes keep working until then. So do not treat a following "class not found", or a still-working feature, as a failure of this command; check project_saved and then restart. A plugin the .uproject already has in that state is a no-op: project_saved=false and nothing saved; a .uproject that cannot be saved makes success false. A name this editor has not discovered as a plugin is an error, and nothing is written to the .uproject. WARNING: disabling a plugin whose assets are referenced leaves those references broken on the next start; check get_plugin_status and the referencers first. Use get_plugin_status to read the current state.

Parameter Type Required Description
plugin_name string yes Plugin name exactly as in its .uplugin file (e.g. 'PythonScriptPlugin'), not a path.
enabled boolean no Optional bool (default true): true enables the plugin, false disables it.

Returns: { plugin_name: string (the plugin's own spelling), enabled: bool (the requested state, set when the .uproject write succeeded), project_saved: bool, note: string about the required restart, or that nothing changed }

set_scalability_quality

Destructive Idempotent

Set the running editor's scalability quality, every sg.* group at once (category all, the default) or one group, through Scalability::SetQualityLevels + ApplyCachedQualityLevels, then read all the levels back. It starts from the current levels, so a single-group change leaves the other groups as they were. The change lives in this editor session only: it is not undoable and is not written to GameUserSettings, an INI or a device profile. Check the levels before with get_scalability_levels; for one sg.* or r.* variable use set_cvar instead. An unknown quality word or category is an error and nothing changes; a number outside 0-4 is clamped. The levels are read back after the change: set is true only when every group asked for now holds its level, and otherwise success is false, with mismatches naming each group the engine left elsewhere. Repeating the call sets the same levels again (idempotent).

Parameter Type Required Description
quality number|string no Level as a number 0-4 (0 Low, 1 Medium, 2 High, 3 Epic, 4 Cinematic; others clamped) or one of "Low", "Medium", "High", "Epic", "Cinematic", case ignored. Required.
category string no One group, case ignored: "ViewDistance", "AntiAliasing", "Shadows", "GlobalIllumination" (or "GI"), "Reflection", "PostProcess", "Texture", "Effects", "Foliage", "Shading", "Landscape"; or "all" (the default) for every group.

Returns: { set: bool, requested_level: int, category: string, ResolutionQuality: int, ViewDistanceQuality: int, AntiAliasingQuality: int, ShadowQuality: int, GlobalIlluminationQuality: int, ReflectionQuality: int, PostProcessQuality: int, TextureQuality: int, EffectsQuality: int, FoliageQuality: int, ShadingQuality: int, LandscapeQuality: int, mismatches?: [string] }

set_struct_member_default

Destructive Idempotent

Set the default value of one member of a Blueprint user-defined struct, found by display name or else by internal var name (case-insensitive), through the engine's struct editor, which checks the value against the member's type and recompiles the struct; one undo step, and the package is marked dirty but not saved (save_asset). Idempotent: a value equal to the stored default text changes nothing and answers already_set true (compared as text, so "1.5" and "1.50" differ). A value invalid for the type, a member that is not found or a path that does not load as a user-defined struct is an error and nothing changes. Read the members and their current defaults with get_struct_members; a new member gets its type from add_struct_member first.

Parameter Type Required Description
struct_path string yes Asset path of the user-defined struct, e.g. "/Game/Data/S_Item", as get_struct_members takes it.
member_name string yes Member to edit, by its display name as get_struct_members returns it (members[].name) or by its var_name; case-insensitive.
default_value string yes New default as text in the member type's format (e.g. "7", "true", "1.5", "Hello", "(X=1.0,Y=2.0,Z=3.0)" for a Vector); pass "" to clear it.

Returns: { struct_path: string, member_name: string, default_value: string, applied_default_value: string, already_set: bool, applied: bool, member: object }

set_undo_barrier

Destructive Idempotent

Drop a floor in the undo stack at the current position so no later undo can cross it -- the way to protect everything done SO FAR (yours or the human's) before starting a risky batch that you may want to unwind. Idempotent: a barrier already sitting at the cursor is not pushed twice (already_existed:true). Lift it with remove_undo_barrier (all=true lifts every barrier).

No parameters.

Returns: { success: bool (a barrier sits at the cursor after the call), already_existed: bool (true = nothing new was pushed), undo_barrier: int (cursor it sits at), undo_count: int, queue_length: int }

set_viewport_settings

Destructive Idempotent

Change any settings of the active level editor viewport (the focused one, else the first) in one call: camera location and rotation, field of view, near and far clip planes, exposure, realtime, view mode, show flags, camera speed, perspective or orthographic view type, game view and cinematic control. Pass only the settings to change; each is validated and applied as its own step, in the order listed here, and the call stops at the first one refused (applied lists those already changed). Editor view only: not undoable, nothing saved. get_viewport_state reads every one of them back.

Parameter Type Required Description
location string no Optional camera [x, y, z] world location
rotation string no Optional camera world rotation, [pitch, yaw, roll] or
fov number no Optional perspective field of view in degrees
near_clip number no Optional near clip plane distance in cm
far_clip number no Optional far clip plane distance in cm; 0 means no far plane
exposure_fixed boolean no Optional: true for a fixed exposure at exposure_ev100, false for automatic eye adaptation
exposure_ev100 number no Optional EV100 used when exposure_fixed is true (typical range -3..20); needs exposure_fixed
realtime boolean no Optional: realtime rendering on or off
view_mode string no Optional engine view mode name, e.g. Lit, Unlit, Wireframe, DetailLighting, LightingOnly, ShaderComplexity, Clay
show_flags object no Optional {flag_name: bool} of engine show flags (Grid, Bounds, Collision, Fog...) set to that state
camera_speed number no Optional camera movement speed, above 0
view_type string no Optional: Perspective, Top, Bottom, Left, Right, Front or Back
game_view boolean no Optional: game view on (editor-only icons and gizmos hidden) or off
allow_cinematic_control boolean no Optional: whether Sequencer may drive this viewport's camera

Returns: { applied: { setting: that setting's reply }, failed?: { label, command, error } (when a setting is refused) }

show_notification

Additive

Show a transient toast in the editor through the Slate notification manager: message, an optional completion state icon and a lifetime in seconds, after which it fades on its own. completion_state is matched without case, and anything other than Pending, Success or Fail shows no state; the reply echoes it as sent, not as applied. Each call shows another toast, so it is not idempotent, and nothing else changes: no asset, log line or undo step. shown is false when the notification manager returned no toast, and the call still succeeds. An empty or missing message is an error. For a record that stays use print_to_output_log or add_message_log_entry.

Parameter Type Required Description
message string yes The text to display in the notification; empty is an error.
completion_state string no Completion state, case-insensitive: "None" (default), "Pending", "Success" or "Fail"; any other value counts as "None".
duration number no Notification lifetime in seconds before it fades (default 4.0); the value is not validated.

Returns: { shown: bool, message: string, completion_state: string, duration: float }

snap_actor_to_ground

Destructive

Drop ONE editor-world actor straight down until its bounds bottom rests on whatever is below -- meshes, BSP or the landscape. It line-traces first and, because headless traces routinely MISS the landscape, falls back to sampling the heightmap so the actor still lands; sampled_from tells you which path answered. Use snap_actor_to_landscape when the ground is definitely the landscape and you want no trace at all, execute_batch for many actors.

Parameter Type Required Description
actor_name string yes Name of the actor to snap (editor world).
trace_distance number no Optional downward trace distance in cm; defaults to 10000
align_to_surface boolean no When true, rotate actor to match the surface normal (trace hits only; the heightmap fallback has no normal); defaults to false
fallback_heightmap boolean no When true (default) and the downward line trace misses (headless traces routinely miss the landscape), fall back to sampling the landscape heightmap at the actor's XY (same sampler as snap_actor_to_landscape) so the actor still lands. Set false to require a real trace hit.

Returns: { actor: actor JSON, hit: bool, landed: bool, sampled_from: 'trace'|'heightmap', hit_actor?: string, hit_distance?: number }

snap_actor_to_landscape

Destructive

Ground an actor on the landscape by sampling the heightmap at its XY (no line trace; traces miss the landscape headless). Sets the actor's Z so either its mesh bbox bottom or its origin sits at the sampled height + z_offset.

Parameter Type Required Description
actor_name string yes Internal name of the actor to place (Actor->GetName())
align string no Optional 'mesh_bbox_bottom' (default; drops the lowest mesh-geometry point onto the ground) or 'actor_origin' (puts the actor origin at the ground)
z_offset number no Optional extra world-Z added above the sampled ground height; defaults to 0

Returns: { actor: actor JSON, landed_z: number (sampled ground world-Z), previous_z: number, new_z: number, sampled_from: 'heightmap', in_bounds: bool, align: string, align_used: string, z_offset: number, landscape_actor_name: string }

spawn_actor

Destructive

Pack actors: enable_toolset adds it to a client's list (tool lists).

Place an actor of ANY placeable class -- a built-in short name (StaticMeshActor, PointLight, SpotLight, DirectionalLight, RectLight, SkyLight, CameraActor, Character), another engine or plugin class by name or path (SkyAtmosphere, ExponentialHeightFog, VolumetricCloud, SceneCapture2D, TextRenderActor, NiagaraActor, /Script/Engine.DecalActor...) or a Blueprint asset path -- into the editor level or a live PIE world, at an optional location/rotation/scale, and set its properties in the same call: properties={"Prop": v} on the actor, {"Component.Prop": v} on a component named so or of a class only one component has (e.g. {"ExponentialHeightFogComponent.FogDensity": 0.05}), written as set_properties writes them. A volume needs a brush: spawn_box_volume places one; an abstract or non-placeable class is refused. Refuses a name an actor already has (omit name to let the engine pick a unique one); the spawn is undoable. A property that cannot be written makes the call fail with properties_failed while the actor stays, so fix it with set_properties or remove it with delete_actor. It creates the actor in MEMORY only -- save_level (with the .umap writable) puts it on disk. WARNING: with 2+ PIE clients world='pie' can land in the CLIENT world, producing an actor the authority never sees -- ask for world='server' instead, and check has_authority and world_package in the reply.

Parameter Type Required Description
type string yes The actor class: a built-in short name (StaticMeshActor, PointLight, SpotLight, DirectionalLight, RectLight, SkyLight, CameraActor, Character; a light also as Point, Spot, Directional, Rect or Sky), any other actor class by name or /Script path, or a Blueprint asset path (/Game/BP_Door). Volumes go through spawn_box_volume.
name string no Optional internal name (and label) for the new actor; must be unused in the target world or the call is refused. When omitted the engine names the actor uniquely and the label is the class default.
location array no Optional world location, ARRAY form only: [x, y, z]; the origin when omitted. Any other value (an object, another length) is an error and nothing is spawned.
rotation array no Optional world rotation as the array [pitch, yaw, roll] -- note index 2 is ROLL, not yaw -- or, unambiguously, the object {"pitch":..,"yaw":..,"roll":..}, which is the recommended form. Defaults to zero. Directional, spot and rect lights shine along its forward axis.
scale array no Optional world scale, ARRAY form only: [x, y, z]. Defaults to 1,1,1; any other value (an object, another length) is an error and nothing is spawned.
static_mesh string no Optional UStaticMesh asset path, only honoured for type=StaticMeshActor (e.g. /Engine/BasicShapes/Cube).
intensity number no Optional, light types only: the light component's Intensity in the light's units (Directional: lux; Sky: a multiplier); engine default when omitted. Sent for a non-light type it is refused and nothing is spawned.
color array no Optional, light types only: [r, g, b] linear color, usually 0..1; engine default (white) when omitted. Sent for a non-light type it is refused and nothing is spawned.
properties object no Optional {"Prop": value, "Component.Prop": value} written after the spawn with set_properties' writer: engine property names, a struct as a JSON object of the fields to change.
world string no Optional world selector for WHERE the actor is spawned: absent/'editor' (default) | 'pie' (ambiguous: PlayWorld, else the first PIE context) | 'game' (alias of 'pie') | 'server' (the PIE world with authority -- what you want for anything replicated) | 'client' | 'pie:N'. Case-insensitive; an unrecognised value is a clean error listing the worlds present, never a silent spawn into the editor world.

Returns: { actor JSON via DescribeActorObject: name, class, location, rotation, scale, plus world: string (the normalized selector that resolved), world_name: string, world_package: string (the UEDPIE_N prefix lives HERE), world_type: string, net_mode: string, pie_instance: int, has_authority: bool, local_role: string, light_intensity?: number (light types: the intensity now on the component), light_color?: [r, g, b] (light types: the color now on the component), properties_set?: [string], properties_failed?: [{property, error}] (with properties) }

sync_content_browser_to_assets

Additive Idempotent

Point the Content Browser at assets: it navigates to their folder and selects them, the way "Browse to Asset" does, so the user sees what you mean. Nothing is loaded or changed on disk. Paths that name no asset are reported in not_found and the rest are still synced; a call where none resolves fails. The browser applies the selection on its next ticks, so the reply cannot read it back: call get_selected_assets afterwards to confirm. Refused in a headless editor with no Content Browser.

Parameter Type Required Description
asset_paths array yes Required array of asset paths: object paths ('/Game/A/B.B'), package paths ('/Game/A/B') or unambiguous bare asset names.
focus boolean no Optional bool (default true): bring the Content Browser tab to the front.
allow_locked_browsers boolean no Optional bool (default false): also sync a Content Browser the user has locked.

Returns: { synced: [{ asset_path: string, package_name: string, asset_name: string, asset_class: string }], synced_count: int, not_found: [{ path: string, error: string }], has_content_browser: bool, focus: bool }

undo

Destructive

Core tool: every client lists it by default.

Step the editor's undo stack back by one transaction, or by count of them, as Ctrl+Z does, and report what is now on top.

Use it to revert an edit made in the editor, by a tool or by a person: the stack is shared, so read get_undo_state first to see the label you are about to revert. One tool call that changed something is usually one transaction; begin_transaction and end_transaction make several edits one. Undo reverts objects in memory, not files: an edit already saved stays on disk until the next save.

Example: {"count": 3} undoes the last three transactions. It stops early at the bottom of the stack or at an undo barrier (set_undo_barrier), and actually_undone then falls short of requested. success is true even with nothing to undo: read applied, and re-read what you changed to confirm it.

Parameter Type Required Description
count integer no Optional. How many transactions to undo, at least 1 (default 1); stops early when the stack runs out or reaches an undo barrier. Below 1 is refused.

Returns: { applied: bool, requested: int, actually_undone: int, undo_count: int, can_undo: bool, next_undo: string }

wait_for_asset_compilation

Read-only

Block until the editor has finished compiling the chosen kinds of assets (shaders, textures, static_meshes, skeletal_meshes... as get_asset_compilation_status names them), or until timeout_seconds, and report what finished and what remains per kind. success is false when it timed out with work left; the data still says how far it got.

While it waits it does what the engine's tick would: it pumps every asset compiling manager (all kinds, since shaders wait on textures) and the game thread's task queue between short sleeps. The editor does not redraw and no other MCP call runs meanwhile, so keep the timeout short and call it again rather than asking for minutes; do not call it while run_automation_test or run_functional_test_in_pie has a test running, since it blocks the ticks the test needs.

Parameter Type Required Description
timeout_seconds number no Optional float (default 60, clamped 0..600): upper bound on the wait. 0 pumps once and reports.
kinds array no Optional list of kinds to wait for, by kind ("shaders") or engine type name ("UE-Shader"), case-insensitive; default all. An unknown kind is an error that lists the kinds there are.
poll_interval_seconds number no Optional float (default 0.05, clamped 0.01..1): sleep between pumps.
include_assets boolean no Optional bool (default false): list the object paths still compiling after the wait, for textures, static_meshes, skeletal_meshes and sound_waves.
max_assets integer no Optional int (default 50, clamped 1..1000): most paths listed per kind.

Returns: { completed: bool, timed_out: bool, elapsed_seconds: float, pumps: int, remaining_before: int, remaining_after: int, kinds: [{ kind: string, type_name: string, remaining_before: int, remaining_after: int, finished: bool, assets?: [string], assets_total?: int, assets_truncated?: bool }], shader_jobs?: { outstanding: int, pending: int, remaining: int, compiling: bool } }