Skip to main content
Glama

list_subclasses

Enumerate all loaded classes derived from a specified base class, including Blueprint classes, with optional name pattern and limit filters.

Instructions

Every loaded class derived from a base class, Blueprint classes included.

ref is a class path ('/Script/Engine.PlayerController'); passing an object that is not a Class or BlueprintGeneratedClass raises. The base itself is excluded. pattern is an optional Lua pattern matched against the short name.

Returns {base, count, types}, where count is the number of matches before limit and each row is {name, kind, path, parent} with parent the immediate super class's short name. Rows are sorted by path. The engine keeps no reverse index, so this walks every UObject and tests IsChildOf: about 1.5 s on a large game.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYes
limitNo
patternNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and handles it well: it discloses that invalid ref inputs raise, the base class is excluded from results, pattern matching applies to the short name, results are sorted by path, and the underlying scan takes about 1.5 seconds on large games. These details meaningfully shape invocation expectations.

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 information-dense but well organized: purpose first, then parameter notes, then return shape and performance caveat. Every sentence earns its place and avoids repetition, making the content easy to scan and act on.

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?

There is no output schema and no annotations, yet the description fully specifies the return structure ({base, count, types}), row shape ({name, kind, path, parent}), sorting, error behavior, and performance cost. An agent has everything necessary to decide whether to call the tool and understand its result without external context.

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

Parameters5/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 explain parameters itself. It defines ref as a class path with a required type, notes that non-Class/BlueprintGeneratedClass inputs raise, explains pattern as an optional Lua pattern on short names, and clarifies limit via 'count is the number of matches before limit'. All three parameters are given meaningful semantics beyond 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?

The description immediately states the tool enumerates every loaded class derived from a base class, including Blueprint classes. This clearly identifies the operation and scope, and implicitly distinguishes it from sibling tools like list_types by focusing on the subclass relationship.

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 gives clear context for using the tool: pass a class path, avoid non-Class/BlueprintGeneratedClass objects, and optionally use a Lua pattern. It does not explicitly name when-not-to-use or point to an alternative sibling, but the intended use is evident and no exclusions are needed.

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