Skip to main content
Glama

Press or release a button

control_emulator

Press or release a controller button on the emulator; it briefly resumes to register the input, then pauses again for precise control.

Instructions

Presses or releases a controller button. The emulator briefly resumes just long enough for the input to register, then pauses again — so it never runs unattended while you're "thinking". To hold a direction across multiple 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.
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses the critical behavior that the emulator only runs briefly to register input and then pauses, which prevents unattended execution. It also explains how state='down'/'up' works for holding inputs.

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?

The description is two sentences, concise and front-loaded. The first sentence states the core action, and the second adds a crucial usage pattern. No wasted words.

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 simple input tool with no output schema, this description covers the action, the behavior of the emulator, and how to combine with skip_frames. It doesn't mention return values, but they are likely trivial. The only minor gap is not stating any prerequisites (e.g., ROM loaded) but siblings imply context.

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 descriptions already cover each parameter, and the description adds value by illustrating the practical use of state for holding directions. This enriches the meaning of state beyond the basic enum description.

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 uses a specific verb ('presses or releases') and identifies the resource ('controller button'). It clearly distinguishes this from sibling tools like get_current_screen and skip_frames by focusing on input control.

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?

The description explains the emulator's resume-pause behavior and gives explicit guidance for holding a direction across skip_frames() calls. It doesn't explicitly contrast with alternatives, but the context makes it the obvious choice for button input.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thevalmarch/opalemu-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server