Skip to main content
Glama

editor_move_camera

Position the viewport camera at specified coordinates and angles to capture screenshots from precise perspectives in Unreal Engine.

Instructions

Move the viewport camera to a specific location and rotation for positioning screenshots

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationYesCamera world position coordinates
rotationYesCamera rotation in degrees

Implementation Reference

  • Python script implementing the camera movement logic using Unreal Engine's EditorLevelLibrary to set viewport camera position and rotation.
    import unreal
    import json
    
    
    def move_viewport_camera(location, rotation):
        try:
            location_vector = unreal.Vector(
                location["x"], location["y"], location["z"]
            )
            rotation_rotator = unreal.Rotator(
                rotation["roll"], rotation["pitch"], rotation["yaw"]
            )
    
            unreal.EditorLevelLibrary.set_level_viewport_camera_info(
                location_vector, rotation_rotator
            )
    
            return {
                "success": True,
                "location": {
                    "x": location["x"],
                    "y": location["y"],
                    "z": location["z"],
                },
                "rotation": {
                    "pitch": rotation["pitch"],
                    "yaw": rotation["yaw"],
                    "roll": rotation["roll"],
                },
            }
    
        except Exception as e:
            return {"success": False, "error": str(e)}
    
    
    location_data = ${location}
    rotation_data = ${rotation}
    
    if location_data and rotation_data:
        result = move_viewport_camera(location_data, rotation_data)
        print(json.dumps(result))
    else:
        print(
            json.dumps(
                {"success": False, "error": "Location and rotation parameters are required"}
            )
        )
  • MCP tool registration for 'editor_move_camera', including Zod input schema for location and rotation objects, and thin handler that runs the templated Python script via Unreal remote execution.
    server.tool(
    	"editor_move_camera",
    	"Move the viewport camera to a specific location and rotation for positioning screenshots",
    	{
    		location: z
    			.object({
    				x: z.number(),
    				y: z.number(),
    				z: z.number(),
    			})
    			.describe("Camera world position coordinates"),
    		rotation: z
    			.object({
    				pitch: z.number(),
    				yaw: z.number(),
    				roll: z.number(),
    			})
    			.describe("Camera rotation in degrees"),
    	},
    	async ({ location, rotation }) => {
    		const result = await tryRunCommand(editorTools.UEMoveCamera(location, rotation))
    		return {
    			content: [
    				{
    					type: "text",
    					text: result,
    				},
    			],
    		}
    	},
    )
  • Helper function that reads the ue_move_camera.py template and substitutes the location and rotation parameters as JSON strings using the Template utility.
    export const UEMoveCamera = (
    	location: { x: number; y: number; z: number },
    	rotation: { pitch: number; yaw: number; roll: number },
    ) => {
    	return Template(read("./scripts/ue_move_camera.py"), {
    		location: JSON.stringify(location),
    		rotation: JSON.stringify(rotation),
    	})
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool moves the camera for positioning, implying a mutation or view change, but doesn't disclose behavioral traits such as whether this requires specific editor permissions, if it affects other editor states, potential side effects, or how it interacts with other tools. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the core action ('Move the viewport camera') and purpose ('for positioning screenshots'), with zero wasted words. It's appropriately sized for the tool's complexity, making it easy to scan and understand quickly.

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

Completeness3/5

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

Given the tool's moderate complexity (2 parameters with nested objects), no annotations, and no output schema, the description is somewhat incomplete. It covers the basic purpose but lacks details on behavioral aspects, error handling, or integration with sibling tools like 'editor_take_screenshot'. For a mutation tool without annotations, more context would be beneficial to ensure safe and effective use.

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

Parameters3/5

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

Schema description coverage is 100%, with clear descriptions for 'location' and 'rotation' parameters in the schema. The description adds minimal value beyond the schema, as it mentions 'specific location and rotation' but doesn't provide additional context like coordinate systems, units, or constraints. With high schema coverage, the baseline is 3, and the description doesn't significantly enhance parameter understanding.

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

Purpose4/5

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

The description clearly states the action ('Move the viewport camera') and the resource ('to a specific location and rotation'), with a specific purpose ('for positioning screenshots'). It distinguishes from siblings like 'editor_take_screenshot' by focusing on camera positioning rather than capturing. However, it doesn't explicitly differentiate from all siblings, such as 'editor_update_object' which might also involve movement.

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 for 'positioning screenshots', suggesting it should be used before taking screenshots, but it doesn't provide explicit guidance on when to use this tool versus alternatives like 'editor_update_object' for object movement or 'editor_take_screenshot' for capturing. No exclusions or clear alternatives are mentioned, leaving usage context somewhat vague.

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