Skip to main content
Glama

get_input_action_state

Read-onlyIdempotent

Read the live Enhanced Input state of an InputAction to verify whether it fired, since input injection succeeds regardless. Check is_tracked, trigger events, and last_triggered_world_time as proof.

Instructions

Read the live Enhanced Input state of one InputAction for a local player in a running PIE or game session: is_tracked, trigger_events, value, last_triggered_world_time and the mapping contexts that carry it, applied or not. It is the oracle for whether an input fired, since inject_key_input and trigger_input_action succeed either way: read it before and after, and an advancing last_triggered_world_time is the proof. is_mapped_in_applied_context false means no applied context maps it (removed on mounting, in a vehicle or a menu); is_tracked false means the engine is not evaluating it, typically an unpossessed pawn. In co-op, world picks which local player is read.

Returns: { action_path: string, action_name: string, value_type: string, is_enhanced_input: bool, is_tracked: bool, is_mapped_in_applied_context: bool, trigger_event: number, trigger_events: array, value: array, elapsed_seconds: number, triggered_seconds: number, last_triggered_world_time: number, world_time_seconds: number, contexts_mapping_action: array, contexts_mapping_action_count: number, applied_context_count: number, player_index: number, player_controller: string, player_input_class: string, world: string, note: string }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
worldNoWorld selector: 'pie' (default) | 'server' | 'client' | 'pie:N' | 'game'.
actionNoInputAction to read: full object path or short asset name. Aliases: action_path, action_name.
action_nameNoAlias of action, read only when action is absent or empty and action_path is absent: InputAction object path or short asset name.
action_pathNoAlias of action, read when action is absent or empty: InputAction object path or short asset name.
player_indexNoLocal player index (default 0).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.2.0
    • addedInput schema / properties / action_name / description
      Added value: +"Alias of action, read only when action is absent or empty and action_path is absent: InputAction object path or short asset name."
    • addedInput schema / properties / action_path / description
      Added value: +"Alias of action, read when action is absent or empty: InputAction object path or short asset name."
    • removedInput schema / required
      Removed value: -[
      -  "action"
      -]
  2. 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 carry the read-only/idempotent safety profile, but the description adds real interpretive behavior: is_mapped_in_applied_context false means no applied context maps the action (removed on mounting, in a vehicle or menu), is_tracked false means the engine is not evaluating it (unpossessed pawn), and world selects the local player in co-op. This is context an agent cannot get from the annotations.

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?

Front-loaded: what it reads comes first, then why it matters, then field interpretation. It is long, but since no output schema exists the enumerate-Returns sentence earns its place by documenting the response shape; the density is justified even if not maximally terse.

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 compensates by listing the full return object, and it covers usage procedure, failure-mode interpretation, co-op player selection, and defaults. Nothing an agent needs to call it correctly in PIE or a running session 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 baseline is 3; the description does add meaning about the world parameter in co-op ('world picks which local player is read'), which relates to world and player_index selection. It stops short of explaining the action-path alias resolution order, so it is slightly above the schema-only baseline rather than fully additive.

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 (Read) plus resource (live Enhanced Input state of one InputAction) and scope (local player, running PIE or game session). The phrase 'live ... state ... in a running PIE or game session' implicitly separates it from asset-inspection siblings like get_input_action, so an agent can tell what it returns 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 frames itself as 'the oracle for whether an input fired' and gives the exact procedure: read before and after, with an advancing last_triggered_world_time as proof. It also contrasts with inject_key_input and trigger_input_action, which the description notes succeed regardless, clarifying when this tool is the reliable alternative.

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