Skip to main content
Glama

add_camera_component

Destructive

Add or configure a camera component on an actor in the editor, attaching it to a SpringArm or other scene component and applying view, projection, and post-process settings.

Instructions

Add a UCameraComponent to an actor placed in the editor world, found by name or label, optionally attaching it to a SpringArm (or any other USceneComponent) on the same actor; if the actor already has a camera component, that first one is configured instead, whatever its name, overwriting only the fields you pass. One undo step; the level is marked dirty, not saved. An invalid projection_mode or a rejected post_process_settings is an error and nothing is created or written.

Returns: { actor_name, component_name, parent_component, already_existed, applied_count, field_of_view, aspect_ratio, projection_mode, location: [x,y,z], rotation: [pitch,yaw,roll], post_process_blend_weight }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationNoOptional [X, Y, Z] relative location vs parent.
rotationNoPREFERRED: the OBJECT {"roll":R,"pitch":P,"yaw":Y} (any subset, absent axes are 0). The ARRAY form below is [pitch, yaw, roll] -- its index 2 is ROLL, NOT yaw, which once put a PlayerStart on its side. Optional [Pitch, Yaw, Roll] relative rotation vs parent.
actor_nameYesName or label of the target actor.
ortho_widthNoOptional float. Orthographic width (only used when projection_mode = "Orthographic").
aspect_ratioNoOptional float. Aspect ratio (e.g. 16/9). 0 = auto.
b_lock_to_hmdNoOptional bool. Lock orientation to the HMD.
field_of_viewNoOptional float. Horizontal FOV in degrees (1..170).
component_nameNoOptional name for a new component (defaults to "Camera"); a name another object of the actor already has gets a unique variant, returned in component_name. Ignored when the actor already has a camera component, which is configured whatever its name.
projection_modeNoOptional string. "Perspective" or "Orthographic".
parent_componentNoOptional name of a USceneComponent on the same actor to attach to (e.g. "SpringArm"). Default = actor root component.
post_process_settingsNoOptional object (PostProcess fields, see get_camera_post_process for the schema).
post_process_blend_weightNoOptional float. Weight of post-process (0..1). 0 means post-process disabled.
b_use_pawn_control_rotationNoOptional bool. Alias for b_use_controller_view_rotation — sets UCameraComponent::bUsePawnControlRotation.
b_use_controller_view_rotationNoOptional bool. Match pawn control rotation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.2
    • changedInput schema / properties / component_name / description
      Previous value: -"Optional name for the new component (defaults to \"Camera\"). If a UCameraComponent with this name already exists on the actor, only the provided fields are updated."New value: +"Optional name for a new component (defaults to \"Camera\"); a name another object of the actor already has gets a unique variant, returned in component_name. Ignored when the actor already has a camera component, which is configured whatever its name."
  2. First observedv1.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, destructiveHint=true): it discloses that one undo step is created, the level is marked dirty but not saved, that only passed fields are overwritten on an existing camera, and that invalid projection_mode or rejected post_process_settings is an error with nothing created or written. That atomicity guarantee is exactly the kind of behavioral context annotations cannot convey.

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 core purpose is front-loaded and the semicolon-separated clauses each carry information (mutation mode, undo, dirty state, error behavior). It is a long single sentence, but with 14 parameters that density is defensible; no obvious filler.

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

Completeness5/5

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

No output schema exists, and the description supplies the full return shape (actor_name, component_name, already_existed, applied_count, transform, projection fields), plus side effects and error semantics. For a 14-parameter mutation tool this is complete enough for an agent to call it correctly.

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% and the schema is extremely detailed (including the rotation array/object pitfall), so baseline is 3. The description adds only the partial-overwrite rule and the returned applied_count/already_existed fields, which is marginal added semantics over the schema.

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?

Specific verb + resource + scope: 'Add a UCameraComponent to an actor placed in the editor world, found by name or label.' It also states the alternate mutation path (configure the existing camera instead), so an agent can distinguish it from sibling camera tools like add_gameplay_camera_component or set_camera_fov.

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

Usage Guidelines4/5

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

The description explains the two operating modes clearly (new component vs. configure existing) and the optional SpringArm attachment, which is real when-to-use context. It does not explicitly name alternatives or state when NOT to use it (e.g., vs. add_gameplay_camera_component), so it falls short of the top band.

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

Deploy Server

Other Tools