Skip to main content
Glama

grant_ability

Grants a gameplay ability class to an editor-world actor's ability system at a whole-number level, returning whether a valid ability spec handle was created. Runtime only.

Instructions

Grant an ability class to an editor-world actor ability system component with GiveAbility at a whole-number level; granted tells whether a valid spec handle came back. Runtime state only (not saved with the level), and granting the same class again adds another spec.

Returns: { actor_name, ability_class, level, granted }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNoSpec level, a whole number; default 1
actor_nameYesObject name (not the label) of the editor-world actor, e.g. "BP_Hero_C_1", matched case-insensitively; find_actors_by_name maps labels to names
ability_classYesClass path of a UGameplayAbility subclass: "/Game/Abilities/GA_Jump.GA_Jump_C" for a Blueprint, "/Script/MyGame.MyAbility" for C++

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.2.0
    • changedInput schema / properties / ability_class / description
      Previous value: -"Full class path of the ability to grant"New value: +"Class path of a UGameplayAbility subclass: \"/Game/Abilities/GA_Jump.GA_Jump_C\" for a Blueprint, \"/Script/MyGame.MyAbility\" for C++"
    • changedInput schema / properties / actor_name / description
      Previous value: -"Name of the actor to grant the ability to"New value: +"Object name (not the label) of the editor-world actor, e.g. \"BP_Hero_C_1\", matched case-insensitively; find_actors_by_name maps labels to names"
    • changedInput schema / properties / level / description
      Previous value: -"GameplayEffect/ability level (default 1)"New value: +"Spec level, a whole number; default 1"
  2. First observedv1.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false. The description adds meaningful behavior beyond that: the grant is runtime-only and not persisted with the level, and granting the same class twice produces two specs (explaining the non-idempotent flag). It does not cover auth/permission requirements or whether the actor must be in PIE.

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?

Two dense sentences plus a short Returns line, with the core action front-loaded and no filler. Slight redundancy with the schema (the 'whole-number level' constraint is repeated), which keeps it from being maximally tight.

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?

No output schema exists, but the description supplies the return shape ({ actor_name, ability_class, level, granted }) plus the two runtime behaviors an agent most needs to know. Complete enough to call correctly; only permission/PIE-context details are absent.

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 coverage is 100%, so actor_name, ability_class, and level are already fully documented in the schema. The description restates 'whole-number level' but adds no format, range, or resolution detail beyond the schema, so the baseline 3 applies.

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 (grant), resource (an ability class), and target (an editor-world actor's ability system component via GiveAbility), which cleanly separates it from siblings like remove_ability, activate_ability, and get_ability_info. The description also names the result field that signals success.

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

Usage Guidelines3/5

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

Useful scoping context is given (runtime state only, not saved with the level; repeat grants stack another spec), which implies when this is appropriate. However it never explicitly contrasts this with alternatives such as remove_ability or the gameplay-effect route (set_gameplay_effect_component_granted_abilities), and no prerequisites are stated.

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