Skip to main content
Glama

editor_get_world_outliner

Retrieve all actors in the current Unreal Engine world with their properties and transform data for scene analysis and management.

Instructions

Get all actors in the current world with their properties

Example output: {'world_name': 'TestMap', 'total_actors': 45, 'actors': [{'name': 'StaticMeshActor_0', 'class': 'StaticMeshActor', 'location': {'x': 0.0, 'y': 0.0, 'z': 0.0}, 'rotation': {'pitch': 0.0, 'yaw': 0.0, 'roll': 0.0}, 'scale': {'x': 1.0, 'y': 1.0, 'z': 1.0}, 'is_hidden': false, 'folder_path': '/Meshes', 'components': ['StaticMeshComponent', 'SceneComponent']}]}

Returns complete world outliner with all actors and their transform data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The Python script implementing the core logic for retrieving the world outliner data using Unreal Engine's Python API. The `get_world_outliner()` function collects actor details including name, class, transform (location, rotation, scale), visibility, folder path, and components.
    from typing import Dict, Any
    import unreal
    import json
    
    
    def get_world_outliner() -> Dict[str, Any]:
        world = unreal.get_editor_subsystem(unreal.UnrealEditorSubsystem).get_editor_world()
        if not world:
            return {"error": "No world loaded"}
    
        # Get all actors in the current level
        all_actors = unreal.get_editor_subsystem(
            unreal.EditorActorSubsystem
        ).get_all_level_actors()
    
        outliner_data = {
            "world_name": world.get_name(),
            "total_actors": len(all_actors),
            "actors": [],
        }
    
        for actor in all_actors:
            try:
                actor_info = {
                    "name": actor.get_name(),
                    "class": actor.get_class().get_name(),
                    "location": {
                        "x": actor.get_actor_location().x,
                        "y": actor.get_actor_location().y,
                        "z": actor.get_actor_location().z,
                    },
                    "rotation": {
                        "pitch": actor.get_actor_rotation().pitch,
                        "yaw": actor.get_actor_rotation().yaw,
                        "roll": actor.get_actor_rotation().roll,
                    },
                    "scale": {
                        "x": actor.get_actor_scale3d().x,
                        "y": actor.get_actor_scale3d().y,
                        "z": actor.get_actor_scale3d().z,
                    },
                    "is_hidden": actor.is_hidden_ed(),
                    "folder_path": str(actor.get_folder_path())
                    if hasattr(actor, "get_folder_path")
                    else None,
                }
    
                components = actor.get_components_by_class(unreal.ActorComponent)
                if components:
                    actor_info["components"] = [
                        comp.get_class().get_name() for comp in components[:5]
                    ]
    
                outliner_data["actors"].append(actor_info)
    
            except Exception as e:
                continue
    
        outliner_data["actors"].sort(key=lambda x: x["name"])
    
        return outliner_data
    
    
    def main():
        outliner_data = get_world_outliner()
        print(json.dumps(outliner_data, indent=2))
    
    
    if __name__ == "__main__":
        main()
  • MCP tool registration for 'editor_get_world_outliner'. Defines no input schema, a detailed description, and a handler that executes the tool via `tryRunCommand(editorTools.UEGetWorldOutliner())` and returns the result as text content.
    server.tool(
    	"editor_get_world_outliner",
    	"Get all actors in the current world with their properties\n\nExample output: {'world_name': 'TestMap', 'total_actors': 45, 'actors': [{'name': 'StaticMeshActor_0', 'class': 'StaticMeshActor', 'location': {'x': 0.0, 'y': 0.0, 'z': 0.0}, 'rotation': {'pitch': 0.0, 'yaw': 0.0, 'roll': 0.0}, 'scale': {'x': 1.0, 'y': 1.0, 'z': 1.0}, 'is_hidden': false, 'folder_path': '/Meshes', 'components': ['StaticMeshComponent', 'SceneComponent']}]}\n\nReturns complete world outliner with all actors and their transform data.",
    	{},
    	async () => {
    		const result = await tryRunCommand(editorTools.UEGetWorldOutliner())
    		return {
    			content: [
    				{
    					type: "text",
    					text: result,
    				},
    			],
    		}
    	},
    )
  • Helper function that reads and templates the ue_get_world_outliner.py script content for execution by the MCP tool handler.
    export const UEGetWorldOutliner = () => Template(read("./scripts/ue_get_world_outliner.py"))
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses that the tool retrieves data (not modifies) and returns comprehensive transform data, but lacks details on permissions needed, rate limits, error conditions, or whether it requires a specific editor state. The example output helps but doesn't cover all behavioral aspects for a read operation in a game editor context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, followed by a helpful example output and a clarifying sentence about completeness. While the example output is detailed, it serves to illustrate return format. Some minor trimming (e.g., combining the last two sentences) could improve conciseness, but overall it's well-structured with minimal waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 0 parameters, no annotations, and no output schema, the description provides adequate context for a read-only tool: it explains what data is returned (actors with properties/transforms) and includes an example. However, it doesn't mention potential limitations (e.g., large worlds causing performance issues) or dependencies (e.g., requires an open world), leaving slight gaps in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, focusing instead on output semantics. This meets the baseline of 4 for zero-parameter tools, as it efficiently avoids redundant information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get all actors') and resource ('in the current world with their properties'), distinguishing it from siblings like editor_get_map_info (which gets map-level data) or editor_get_asset_info (which focuses on assets rather than world actors). The verb 'Get' combined with 'all actors' and 'complete world outliner' provides precise scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when needing actor data from the current world, but doesn't explicitly state when to use this tool versus alternatives like editor_get_map_info for broader map details or editor_search_assets for asset-specific queries. No explicit exclusions or prerequisites are mentioned, leaving usage context somewhat implied rather than clearly defined.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/runreal/unreal-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server