Skip to main content
Glama

targeted_actor

Trace from the camera or a reference actor to identify the targeted actor, component, and impact details in a running Unreal Engine game.

Instructions

What the player is looking at: a line trace from the camera along its forward vector.

distance is in centimetres (the engine's unit), default 5000. channel is a trace channel: 0 = Visibility, 1 = Camera. ref traces from that actor's own location and forward vector instead of the camera, which is how you ask what an NPC faces.

Returns {hit} alone on a miss, otherwise {hit, actor, actor_class, component, component_class, distance, impact_point, impact_normal, bone, phys_material, materials}. actor is the hit component's owner; materials are the component's material full names (first 32) when it exposes GetMaterials. Read-only: it works with allow_writes = false.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNo
channelNo
distanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

A4.5/5.0
Behavior4/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 discloses the read-only nature ('Read-only: it works with allow_writes = false'), the miss behavior ('Returns {hit} alone on a miss'), the full hit result shape, and the materials truncation behavior ('first 32'). This is substantial behavioral disclosure. It doesn't mention performance cost or whether the trace respects collision complexity, but for a read-only query tool the disclosed behavior is strong.

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 dense but well-organized: a one-line plain-language summary, then parameter explanations, then return shape, then read-only note. Every sentence adds information. It could be slightly more scannable with line breaks, but it is not bloated.

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 read-only trace tool with 3 optional parameters and no output schema, the description covers the purpose, parameter semantics, return values, and safety profile. The only missing context is how to specify the ref actor (name vs. ID) and perhaps an example call. But the description is complete enough for an agent to invoke the tool correctly in most cases.

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?

Schema description coverage is 0%, so the description must compensate. It explains all three parameters: distance (unit and default), channel (enum-like mapping), and ref (meaning and use case). The only minor gap is that it doesn't explicitly state that ref is an actor reference or how to specify it (e.g., by name or ID), but the description's explanation of ref is still meaningful.

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 opens with a plain-language statement of what the tool does ('What the player is looking at') and then gives a precise technical definition: a line trace from the camera along its forward vector. It clearly distinguishes itself from sibling tools like find_object/find_objects (which search by criteria) and inspect_object (which inspects a known object). The verb+resource+mechanism are all specific.

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

Usage Guidelines5/5

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

The description explicitly explains when to use the ref parameter ('which is how you ask what an NPC faces'), and the channel parameter's meaning is given with its values. It also states the default distance and unit. While it doesn't name sibling alternatives explicitly, the usage context is clear enough that an agent can decide when to call this tool versus find_object or inspect_object.

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