Skip to main content
Glama

gamepad

Control a virtual Xbox 360 controller in a session: press buttons, push sticks, pull triggers, hold inputs, or release all. Test programs that read controller input.

Instructions

Work a virtual gamepad, in a session started with gamepads: press buttons together, tapped, held for hold seconds, or with state down left down until a call with state up; push a stick to x, y; pull a trigger to value; or neutral, letting go of everything. A stick or trigger stays where it's put, unless hold says for how long. Programs in the session see a real Xbox 360 controller, and none of the machine's.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoThe stick, left to right
yNoThe stick, up to down
padNoWhich of the session's pads (1)
holdNoSeconds to keep it down before letting go
stateNoOnly press, leaving it down until a call with up; or only let go
valueNoThe trigger, let go to pulled all the way
whichNoWhich stick or trigger
actionYesPress buttons, push a stick, pull a trigger, or let go of everything
buttonsNoa b x y lb rb back start guide ls rs, and the d-pad's up down left right
sessionYesIts name, from start_session

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.1

TDQS

A3.7/5.0
Behavior4/5

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

Annotations only declare this as a non-read-only, non-destructive action, so the description carries most of the behavioral burden and does well: it explains persistence ('a stick or trigger stays where it's put, unless hold'), the down/up state semantics, and isolation ('programs see a real Xbox 360 controller, and none of the machine's'). It does not cover error conditions or limits on pads/buttons.

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 sentences, both information-dense with no filler, and the action modes are front-loaded ahead of the state/persistence caveat. The first sentence is long and semicolon-heavy, which slightly taxes readability.

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?

For a 10-parameter action tool with no output schema and minimal annotations, the description covers the action model, state persistence, hold duration, session prerequisite, and emulation isolation. Remaining details (pad indexing, button names) live in the schema, so nothing critical 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 coverage is 100%, so the baseline is 3; each parameter already has a descriptive field. The prose clarifies cross-parameter behavior (hold overrides the persistent state, state down persists until an up call) but adds little per-parameter meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the specific resource (a virtual gamepad) and enumerates the four action modes (press, stick, trigger, neutral) matching the action enum, so the agent knows exactly what it does. It does not explicitly contrast itself with siblings like press_keys or click, so it falls short of a 5.

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?

It states the precondition 'in a session started with gamepads' and the session param points back to start_session, so the implied workflow is that a session must exist first. There is no explicit guidance on when to prefer gamepad over press_keys or other input tools, and no exclusions.

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