Skip to main content
Glama

cpp_analyze_class

Analyze a UCLASS from its C++ header to extract class metadata, including parent class, UCLASS flags, properties, methods, and implemented interfaces, returning structured JSON for inspection or further tool use.

Instructions

Analyze a UCLASS in the project's C++ source.

Extracts class metadata from .h files: parent class, UCLASS flags, UPROPERTY members, UFUNCTION methods, implemented interfaces.

Call cpp_set_codebase_path() first to point the bridge at your source.

Args: class_name: C++ class name (e.g. 'UUnrealMCPBridge', 'ABP_Hero'). include_inherited: Include inherited members (not yet implemented, reserved).

Returns: JSON StructuredResult with outputs: class, parent_class, uclass_flags, interfaces, properties [{name, type, uproperty_flags}], methods [{name, return, params, ufunction_flags}], header_file, line

KB: see knowledge_base/12_MCP_TOOL_USAGE_GUIDE.md#overview Example: cpp_analyze_class(class_name="Actor")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
class_nameYes
include_inheritedNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the transparency burden and does well: it reveals that include_inherited is 'not yet implemented, reserved', that the tool depends on a previously set codebase path, and that returns come as a JSON StructuredResult with a detailed output list. It does not state whether the operation is read-only, but 'Analyze'/‘Extracts’ strongly implies it.

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 longer than usual but well organized with clear sub-sections (Args, Returns, KB, Example). Each part earns its place, and the example is practical. No filler or redundant repetition of schema fields.

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?

Given that an output schema exists, the description goes beyond what is required by listing the return structure, and it covers the prerequisite, a reserved-parameter caveat, and a usage example. It remains slightly incomplete on error behavior and alternatives, but for a read-only introspection tool this is a solid, complete definition.

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, and it does: it explains class_name with concrete examples ('UUnrealMCPBridge', 'ABP_Hero') and clarifies that include_inherited is reserved and not yet functional. This adds real meaning beyond the bare schema titles.

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 opens with a specific verb and resource: 'Analyze a UCLASS in the project's C++ source' and lists the exact metadata extracted (parent class, UCLASS flags, UPROPERTY members, UFUNCTION methods, implemented interfaces). It clearly differentiates itself from Blueprint-focused siblings by scoping to .h files, though it does not explicitly name an alternative tool.

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 an explicit prerequisite: 'Call cpp_set_codebase_path() first to point the bridge at your source,' which tells the agent the required prior step. It also frames usage around C++ source analysis, providing clear context. It does not explicitly state when not to use this tool or name sibling alternatives, so it misses the top score.

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