Skip to main content
Glama

Set Player Input (AI self-play)

unity_set_player_input

Drive a Unity player tank by setting throttle, steering, and queuing one fire shot per call; physical keyboard input is ignored while remote override is active.

Instructions

Drive the player tank remotely: throttle/steer become the TankController input (physical keyboard ignored while override is on). Fire is edge-triggered — one call queues exactly one shot.

Loop: unity_get_game_state -> decide -> unity_set_player_input (repeat ~2-5x/sec) -> poll result. Call unity_clear_player_input to hand control back to the human.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fireNoQueue one shot (edge-triggered, consumed by next frame)
steerNoHull steer: +1 right, -1 left
throttleNoHull throttle: +1 full forward, -1 full reverse

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare this is a non-readonly, non-idempotent, non-destructive write, and the description adds genuinely non-structured context: the physical keyboard is ignored while override is on, and fire is edge-triggered so one call queues exactly one shot. It stops short of describing override persistence/expiry or the shape of the polled result, so it is strong but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short, front-loaded blocks: the behavioral rules first, then the invocation loop and exit path. Every sentence carries actionable content with no filler or repetition.

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?

With no output schema and a 3-parameter fully-documented input, the definition covers the essentials: what it controls, how fast to call it, and how to relinquish control. The only soft spot is 'poll result', which does not name the tool that returns the outcome, leaving a small gap for an agent mid-loop.

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%, so each parameter already documents its semantics (fire edge-triggered; steer/throttle -1..1). The description restates the throttle/steer mapping and the one-shot fire rule without adding syntax, units, or edge cases beyond the schema, so 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?

The description states a specific verb and resource ('Drive the player tank remotely') and explains exactly how the inputs map ('throttle/steer become the TankController input'). It also names the counterpart sibling (unity_clear_player_input) and the related read tool (unity_get_game_state), so an agent can distinguish it without opening any 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?

It gives an explicit operating loop (get_game_state -> decide -> set_player_input, repeated ~2-5x/sec -> poll result) and states when to stop overriding ('Call unity_clear_player_input to hand control back to the human'). The control-transfer alternative is named with its trigger condition, leaving little to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.