Skip to main content
Glama

get_actors_by_class

Read-onlyIdempotent

List every actor of an exact class in a chosen UE5 world and get each name and location. Useful for locating Blueprint instances across editor, PIE, server, or client worlds.

Instructions

Census of one class in a chosen world: names + locations of every actor whose class name matches EXACTLY (no subclasses; a Blueprint needs its runtime name with the _C suffix, e.g. BP_Foo_C), capped at 1000. The co-op workhorse -- world='editor'|'pie'|'server'|'client'|'pie:N' ('server' = the PIE world with authority, 'client' = the other), and the reply stamps world_name/world_package/net_mode/pie_instance so actors_count:0 is readable as "not in THIS world" instead of "does not exist". Use find_actors_by_name for substring/label search, get_actors_in_radius for proximity. Two false zeros: with 2+ PIE clients a bare world='pie' resolves to only ONE of the two worlds; and after compile_blueprint the placed OFPA instances vanish from BOTH editor and PIE worlds in memory (git shows them intact on disk -- the fix is load_level of the same map, never re-placing them).

Returns: { class_name: string, world: string, actors: [{ name: string, class: string, location: { x: number, y: number, z: number } }], actors_count: number, world_name: string|null, world_package: string|null, world_type: string|null, net_mode: string|null, pie_instance: number }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
worldNoOptional world selector: absent/'editor' (default) | 'pie' (ambiguous: PlayWorld, else the first PIE context) | 'server' (the PIE world with authority) | 'client' | 'pie:N' | 'game' (alias of 'pie').
class_nameYesWhole UClass name, e.g. 'StaticMeshActor' or 'BP_MyTurret_C'. Compared case-insensitively but WHOLE-string: not a path, not a substring, and never matched against parent classes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior, but the description goes much further by disclosing the 1000-result cap, exact-match semantics, world reply stamps, and two concrete false-zero traps (multi-PIE world='pie' ambiguity and OFPA actors vanishing after compile_blueprint with the load_level fix). This is unusually rich behavioral 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 purpose is front-loaded and every major sentence contributes useful context, with the return shape included because no output schema exists. It is dense and somewhat run-on, and it duplicates the schema's world-value list, so it stops just short of ideal conciseness.

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?

For a complex world-context actor query with no output schema, the description covers purpose, alternatives, exact-match caveats, return structure, and known false-zero pitfalls. Annotations already handle the safety profile, so nothing an agent needs to invoke this correctly appears to be missing.

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 100%, so the schema already documents both parameters thoroughly. The description adds some value by reinforcing exact whole-string matching and the _C suffix, and by explaining the practical consequence of world='pie' with multiple PIE clients, but most parameter details are duplicated from 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?

States a specific verb and resource: a census of one class in a chosen world, returning names and locations of every actor whose class name matches EXACTLY. It also distinguishes the tool from siblings by specifying no subclasses and the _C suffix requirement for Blueprints, so an agent can tell it apart from substring searches without opening the schema.

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?

Explicitly routes agents to alternatives: 'Use find_actors_by_name for substring/label search, get_actors_in_radius for proximity.' It also gives clear world-selection guidance for editor, PIE, server, and client contexts, leaving no ambiguity about when this tool is the right choice.

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