Skip to main content
Glama

add_light

Spawn Directional, Point, Spot, Rect, or Sky light actors in the Unreal Editor world (not PIE) at a chosen location and rotation, with optional intensity and color.

Instructions

Spawn a Directional, Point, Spot, Rect or Sky light actor in the editor world (not PIE) at location and rotation, optionally setting intensity and color, outside any undo transaction; nothing is saved. Returns light_type and the internal actor_name of the new actor.

Returns: { light_type: string, actor_name: string }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorNo[r, g, b] linear color, usually 0..1; default white. Any other form (an object, a hex string, fewer than 3 numbers) sets black.
locationNo[x, y, z] world location in cm; default [0, 0, 0], also when the array has fewer than 3 numbers.
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. World rotation in degrees as [pitch, yaw, roll], default [0, 0, 0]; directional, spot and rect lights shine along its forward axis.
intensityNoValue for the Intensity property in the units of the light (Directional: lux; Sky: a multiplier); engine default when omitted.
light_typeYesDirectional, Point, Spot, Rect, or Sky (case-insensitive); anything else is an error.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.2.0
    • changedInput schema / properties / color / description
      Previous value: -"Optional [r, g, b] light color"New value: +"[r, g, b] linear color, usually 0..1; default white. Any other form (an object, a hex string, fewer than 3 numbers) sets black."
    • changedInput schema / properties / intensity / description
      Previous value: -"Optional light intensity"New value: +"Value for the Intensity property in the units of the light (Directional: lux; Sky: a multiplier); engine default when omitted."
    • changedInput schema / properties / light_type / description
      Previous value: -"Directional, Point, Spot, Rect, or Sky"New value: +"Directional, Point, Spot, Rect, or Sky (case-insensitive); anything else is an error."
    • changedInput schema / properties / location / description
      Previous value: -"Optional [x, y, z] world location"New value: +"[x, y, z] world location in cm; default [0, 0, 0], also when the array has fewer than 3 numbers."
    • changedInput schema / properties / rotation / description
      Previous value: -"PREFERRED: 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] world rotation"New value: +"PREFERRED: 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. World rotation in degrees as [pitch, yaw, roll], default [0, 0, 0]; directional, spot and rect lights shine along its forward axis."
  2. First observedv1.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, non-destructive, non-idempotent spawn operation. The description adds important editor-specific behavior beyond that: the actor is created outside any undo transaction and nothing is saved, and it returns the internal actor_name. It does not cover error behavior or actor-selection side effects, but the transaction and persistence disclosures are meaningful.

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 first sentence is front-loaded with the action, scope, and key caveats. The separate 'Returns:' line is useful because no output schema exists, but it duplicates the return information already mentioned in the first sentence, keeping this just short of perfect conciseness.

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?

For a multi-parameter spawn tool with no output schema, the description supplies the essential context: supported light types, editor-world-only scope, lack of undo/persistence, and return shape. It does not specify failure modes beyond what the schema covers, but an agent has enough to invoke 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 parameter schemas are unusually detailed, including color format defaults, rotation object-vs-array semantics, and intensity units. The description only restates the high-level parameters (location, rotation, intensity, color) without adding syntax or constraints beyond the schema, so the baseline of 3 is appropriate.

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 gives a specific verb and resource ('Spawn a ... light actor') plus the supported light types and placement parameters. It also scopes the operation to the editor world rather than PIE, but it does not explicitly differentiate itself from sibling tools such as spawn_sky_light, which can also create a Sky light.

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?

It states the operating context ('editor world (not PIE)') and that no undo transaction is created, which helps an agent understand when the tool applies. However, it never compares this tool to alternatives like spawn_sky_light, spawn_actor, or the set_light_* siblings, so usage selection is only implied.

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