Skip to main content
Glama

Press or release a button

control_emulator
Destructive

Press or release OpalEmu controller buttons to register input, advance gameplay, and return a PNG screenshot; use down/up states to hold directions across frame skips.

Instructions

Presses or releases a controller button. The emulator briefly resumes just long enough for the input to register, then pauses again and returns a PNG screenshot. This advances the game and may affect progress. To hold a direction across skip_frames calls, send state="down" once and state="up" later.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateYes"down" to press, "up" to release.
buttonYesButton to press/release.
playerNoController port, 0-indexed. Defaults to player 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, but the description explains why: the emulator resumes, input registers, then it pauses and returns a PNG, and the game 'advances and may affect progress.' This adds concrete behavioral context beyond the structured hints.

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?

Three sentences, front-loaded with the action, then side effects, then the hold pattern. No filler or repetition of schema content.

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?

Despite no output schema, the description states the return (a PNG screenshot), the emulator state transitions, and the progress side effect. Nothing an agent needs to invoke it correctly is missing.

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% (enums document button/state, defaults document player), so baseline is 3; the description earns an extra point by clarifying the down/up lifecycle needed to hold a direction across calls, which the schema's terse enum descriptions do not convey.

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+resource ('Presses or releases a controller button') that an agent can immediately distinguish from siblings like get_current_screen or skip_frames. The added detail about resuming the emulator to register input sharpens the purpose further.

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?

Explicitly names a sibling (skip_frames) and gives the pattern for holding a direction across calls (state=down once, state=up later), which is real routing guidance. It does not, however, cover when to prefer this over other siblings such as get_current_screen, so it stops short of full when/when-not coverage.

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