Skip to main content
Glama

add_input_modifier

Attach Negate, Swizzle, DeadZone, or Scalar modifiers to a key mapping in a mapping context to reshape its value before the action receives it.

Instructions

Reshape the VALUE a key sends before the action sees it: append a modifier (Negate to flip an axis, Swizzle to remap X/Y/Z, DeadZone for stick drift, Scalar for sensitivity) to a key mapping in a mapping context. This is how one Axis2D action serves WASD -- S is W negated, not a second action. Modifiers change the value, triggers change when it fires (add_input_trigger); list_input_modifier_types enumerates the classes, remove_input_modifier undoes it by index. The context is saved, and the call succeeds only when it reaches disk.

Returns: { context_name, action_name, key, modifier_type, modifier_class, index, modifier_count, saved, save_error? }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoKey name of the mapping the modifier is attached to.
key_nameNoInput key name (e.g. SpaceBar, Gamepad_FaceButton_Bottom)
action_nameNoShort asset name of the InputAction.
action_pathNoAsset path of the Input Action
context_nameNoShort asset name of the InputMappingContext.
context_pathNoAsset path of the Input Mapping Context
modifier_typeYesOne of "Negate", "Swizzle", "DeadZone", "Scalar".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.0
    • changedInput schema / required
      Previous value: -[
      -  "context_name",
      -  "action_name",
      -  "key"
      -]New value: +[
      +  "modifier_type"
      +]
  2. First observedv1.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and non-idempotent, so the mutation profile is covered. The description adds genuinely new behavioral context beyond them: the context is written to disk and the call only succeeds once persisted, which tells the agent to expect a durable side effect and a possible failure rather than an in-memory edit.

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 with the core action and one worked example, then routing to siblings, then the side effect. It is dense rather than bloated, though the parenthetical enumeration of four modifier classes and the inline Returns block make it longer than strictly minimal.

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?

No output schema exists, but the description inlines the return shape (context_name, action_name, key, modifier_type, modifier_class, index, modifier_count, saved, save_error?) including the optional error field. Combined with the 7-param schema and the save semantics, an agent has everything needed to call and interpret the result.

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 coverage is 100%, so the baseline is 3, but the description goes further by explaining what each modifier_type value actually does (Negate flips an axis, Swizzle remaps X/Y/Z, DeadZone for stick drift, Scalar for sensitivity) and clarifies that 'key' is the mapping the modifier attaches to. That is real semantic value beyond the field descriptions.

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?

Specific verb plus resource: 'append a modifier ... to a key mapping in a mapping context', with concrete modifier classes named. It explicitly separates itself from the nearest sibling family by stating that modifiers change the value whereas triggers change when it fires (add_input_trigger), so an agent can pick correctly 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?

Names alternatives and the condition that selects each: add_input_trigger for firing timing, list_input_modifier_types to enumerate classes, remove_input_modifier to undo by index. The WASD/negated-S example gives an explicit when-to-use scenario rather than leaving usage to inference.

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