Skip to main content
Glama

controller

Simulates DualShock 2 button presses and analog stick movement on PS2 ports to test programs, with timed holds, releases, and poll-count checks.

Instructions

Presses buttons on a controller of the target's own making, a DualShock 2 in port 1 or 2, which the program finds there whatever is really plugged in. buttons are those held down, all the others up: select, start, up, right, down, left, triangle, circle, cross, square, l1, l2, l3, r1, r2, r3. The sticks are x and y from -1 to 1, right and down positive, and are centred if not given.

With seconds the buttons are held that long and then let go, the call returning after: a press. Without, they stay as set until the next call; an empty call lets everything go. A program usually wants a button down for a few frames to notice it: 0.1 is a press. unplug takes the controller out, and the port is as it really is again.

polls counts the times the port was asked what's pressed: one that isn't growing means no program is reading it. A console reaches a program that reads the controller through the IOP's sio2man, as the console's own padman and PS2SDK's do.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "controller"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNo
unplugNo
buttonsNo
secondsNo
left_stickNo
right_stickNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does substantial work: it discloses cross-call state persistence, the blocking nature of `seconds`, the release-all semantics of an empty call, and the state reset from `unplug`. It omits error behavior and permission/precondition requirements, and the closing aside about sio2man/padman is context rather than behavioral disclosure.

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

Conciseness3/5

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

Core semantics are front-loaded and the mode distinction is explained well, but the prose is literary and padded — 'of the target's own making', 'whatever is really plugged in', and the closing sio2man/padman paragraph add length without changing how an agent calls the tool. The `polls` sentence describes an output field in a passage about inputs, which briefly confuses the register.

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 six-parameter stateful tool with no annotations, the definition covers the semantics an agent needs: button set, stick encoding, timing modes, state persistence, and reset. An output schema exists so return values need not be spelled out, though the description's mid-text mention of `polls` muddles inputs versus outputs.

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 0%, so the description must compensate, and it largely does: it enumerates every valid button name, defines stick axes as -1 to 1 with right/down positive and centred defaults, and fixes `port` to 1 or 2. Gaps remain: it refers to 'the sticks' and 'x and y' rather than the schema's `left_stick`/`right_stick`, and never states the array ordering or the defaults for port/unplug.

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 states a concrete verb and resource: it presses named buttons on an emulated DualShock 2 in a given port. The button list and stick ranges make the scope unmistakable, though the phrase 'a controller of the target's own making' is more atmospheric than precise.

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?

It explains the operational choice between modes clearly: with `seconds` the press is momentary and the call blocks until release, without it the state persists until the next call, and an empty call releases everything. It also covers `unplug` and gives a practical hint that 0.1s is a noticeable press. It does not name alternatives, but no sibling in the catalog performs this function.

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