Skip to main content
Glama

call_component_function

Destructive

Invoke a UFUNCTION on a component by naming the actor and component class, skipping object path construction. Use for gameplay state on components.

Instructions

Drive a COMPONENT without ever building its object path: name the actor, name the component CLASS, and it resolves the actor (editor world or a live PIE world via world), runs FindComponentByClass, and invokes the UFUNCTION with JSON arguments — the one generalist reflection call that replaces bespoke per-feature helpers (attribute getters, inventory or equipment calls), since almost all gameplay state in a component-based framework lives on components rather than on the actor. Arguments go in a dict named params (call_function uses parameters, call_object_method uses args_json); marshals scalars, ENUM by entry name, STRUCT as a JSON object, ARRAY/set as a JSON array, FGameplayTag (validated) and FGuid, and returns return_value + out_params typed alongside the resolved component_path and the identity of the world that answered. WARNING: it uses the FIRST component of (or derived from) that class. An OBJECT/class argument IS passed by path — resolved in the target's own world first, then as an asset, and a path that resolves to nothing is a hard error, never a silent null. In co-op, world='server' is where authoritative component state lives.

Returns: { success: bool, actor: string, component_class: string, component_path: string, function: string, world: string, returns_json: object ({ return_value?: any, out_params?: object }), transaction?: { requested, modified: [path], saved_to_transaction_buffer, is_package_external, package_name, package_file, package_file_exists, package_dirty_before, package_dirty_after }, verification?: object (only when transact=true), world_name: string|null, world_package: string|null, world_type: string|null, net_mode: string|null, pie_instance: number }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoAlias of `params` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `params`.
actorYesActor name / path / (in PIE, editor) label to resolve. In world='editor' also accepts a full object path / CDO / archetype; in world='pie' resolves within the running PIE world (Actor[.Component[.Subobject]] by name/label).
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'). Anything other than absent/'editor' resolves the actor in that live world (LIVE component instance).
paramsNoOptional {param_name: value} dict. Same marshaling as call_function: scalars; ENUM by entry name string; STRUCT as a JSON object; ARRAY/set as a JSON array; FGameplayTag as {"TagName":"A.B"} (validated); FGuid as a hex/braced string.
functionYesName of the UFUNCTION to call on the component (BlueprintCallable+Public or a BlueprintEvent).
transactNoOptional (default false). Wrap the invocation in an FScopedTransaction and Modify() BOTH the component and its owner actor first (a component's authored state persists in the OWNER's package — the OFPA .uasset for a World Partition actor), so the write is undoable and actually gets saved. REFUSED for pure/const functions and whenever world='pie'.
args_jsonNoAlias of `params` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `params`.
parametersNoAlias of `params` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `params`.
component_classYesComponent CLASS name/path to locate on the actor (bare/native e.g. "AC_Storage", /Script path, or Blueprint asset path — resolved via ResolveClass). The FIRST component of (or derived from) this class is used.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and non-idempotent, but the description goes well beyond them: it warns that the FIRST matching component is used, that OBJECT arguments are passed by path and fail hard rather than silently nulling, that transact refuses pure/const functions and world='pie', and that a component's authored state persists in the owner's package. This is unusually rich behavioral disclosure.

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?

Information is front-loaded (purpose first, warnings and return shape after), and each clause carries meaning. It is dense and parenthetical-heavy, pushing toward the verbose end, but almost nothing is pure filler.

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?

With no output schema, the description proactively documents the return shape (success, resolved component_path, world identity, returns_json, transaction, verification) and covers the mutation/undo semantics an agent needs. For a 9-param destructive reflection call, nothing material is missing.

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 schema itself already documents aliases, the world selector, and marshaling rules (scalars, ENUM, STRUCT, FGameplayTag, FGuid). The description reiterates much of this, adding only the cross-sibling note about which of params/parameters/args_json to prefer. Baseline 3 is appropriate.

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 (invoke/drive) on a specific resource (a UFUNCTION on a component) and explicitly positions itself against siblings call_function and call_object_method, even noting their differing argument-parameter names. An agent can distinguish it from every other reflection call without opening a 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?

Explains when to reach for it (the generalist reflection call that replaces bespoke per-feature helpers, since component-based state lives on components), how to pick a world (editor vs pie vs server for authoritative co-op state), and how it relates to the sibling alternatives. Exclusions and conditions are explicit.

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