Skip to main content
Glama

use_gamepad

Control a virtual Xbox 360 gamepad in a shotbox session: press or hold buttons, push sticks to x/y, pull triggers to a value, or release everything so programs receive gamepad 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. For keys and the mouse, press_keys and click_element.

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. Addedv0.8.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare this is a non-destructive write, and the description adds real behavioral context beyond them: sticks/triggers persist where placed unless 'hold' bounds the duration, and the session sees a real Xbox 360 controller rather than the host's. It does not discuss permissions or concurrency, but the state-persistence disclosure is the key trait an agent needs.

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-loads the core purpose and then enumerates the four action modes efficiently. The sentence is dense and semicolon-heavy, but each clause carries distinct operational information; nothing is padding.

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, no-output-schema input tool with annotations already covering the read/write profile, the description covers purpose, prerequisite, action semantics, and alternatives. Return-value behavior is the only notable omission, which is minor given the interaction is fire-and-observe.

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 bar is a baseline 3, but the description genuinely adds semantics by explaining how state (down until a later up call), hold (seconds kept down), and neutral interact across calls — integration meaning the per-parameter schema text does not convey on its own.

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 (work) over a specific resource (virtual gamepad) and enumerates the operations (press buttons, push stick, pull trigger, neutral). It explicitly distinguishes itself from siblings by routing keyboard/mouse input to press_keys and click_element, so an agent can select it 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 Guidelines4/5

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

Specifies the prerequisite ('in a session started with gamepads') and names the alternative tools for the adjacent input domains (keys and mouse). It stops short of an explicit when-not statement, but the routing to press_keys/click_element covers the main selection decision.

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