Skip to main content
Glama

retroarch_input_press

Latch down RetroPad buttons for a player via RetroArch's Network Gamepad channel. Use for frame-accurate scripting; each press latches until released.

Instructions

PURPOSE: Press (latch down) one or more RetroPad buttons for a player via RetroArch's Network Gamepad channel. USAGE: The low-level press primitive. For a simple press-and-release use retroarch_input_tap instead. For frame-accurate scripting: pause first, call this for ONE button, then retroarch_frame_advance, repeating per change (see BEHAVIOR for why). Buttons follow libretro RetroPad naming — on PlayStation cores: b=Cross, a=Circle, y=Square, x=Triangle. BEHAVIOR: Two receiver behaviors govern all input tools: (1) LATCHING — a pressed button stays down until an explicit release; there is no auto-release or keepalive. Always pair presses with releases or use retroarch_input_release_all. (2) ONE DATAGRAM PER FRAME — RetroArch consumes at most one queued input message per emulated frame per player, so N changes sent back-to-back land over N consecutive frames. For frame-accurate scripting: pause, then alternate one input tool call with one retroarch_frame_advance per change. FIRE-AND-FORGET: the Network Gamepad channel does NOT acknowledge this command — the call returns as soon as the UDP datagram is sent, with no confirmation that RetroArch received or applied it. To verify the effect, follow up with an observable tool (retroarch_get_status for run state, retroarch_read_memory / retroarch_read_ram for memory mutations, retroarch_screenshot for visual state). UDP packets to a not-listening RetroArch are silently dropped. Transport: RetroArch's Network Gamepad receiver over UDP (default 127.0.0.1:55400 + player index; requires network_remote_enable = true AND network_remote_enable_user_p1 = true (per player) in retroarch.cfg, or Settings > Input > Network Gamepad). This is a SEPARATE channel from the NCI command port — enabling Network Commands alone is not enough. RETURNS: 'Pressed BUTTONS (player N)' — UDP-send confirmation only; verify effect via memory read or screenshot.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
playerNoPlayer index, 0-based. Player N's receiver listens at base port + N (default 55400 + N) and must be individually enabled in RetroArch (network_remote_enable_user_p<N+1>). Default 0 (Player 1).
buttonsYesRetroPad button names (case-insensitive): b, y, select, start, up, down, left, right, a, x, l, r, l2, r2, l3, r3. One datagram is sent per button; RetroArch applies one per emulated frame, so multiple buttons land on consecutive frames (all remain latched once applied).
Behavior5/5

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

With no annotations, the description carries the full burden of behavioral disclosure, and it excels. It explains latching behavior, one-datagram-per-frame limits, fire-and-forget semantics, lack of acknowledgment, silent UDP dropping, and the required RetroArch network settings—information critical for correct use.

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?

Although lengthy, the description is organized into labeled sections (PURPOSE, USAGE, BEHAVIOR, FIRE-AND-FORGET, Transport, RETURNS) and every sentence carries necessary information. It is front-loaded with the purpose, and the structure aids scanning without wasted words.

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?

This is a complex tool involving network communication, latched input, and frame-accurate scripting, with no output schema. The description covers the return format, verification strategies, configuration prerequisites, and behavioral caveats, leaving no critical gaps for an agent to misuse the tool.

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?

The schema already documents both parameters comprehensively (100% coverage), so the baseline is 3. The description adds value by mapping libretro button names to PlayStation core conventions (b=Cross, a=Circle) and clarifying that multiple buttons each generate a datagram landing on consecutive frames, which goes beyond schema details.

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 opens with 'PURPOSE: Press (latch down) one or more RetroPad buttons for a player via RetroArch's Network Gamepad channel,' clearly identifying the verb, resource, and mechanism. It also distinguishes itself from retroarch_input_tap and retroarch_input_release, establishing its unique role as the low-level press primitive.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The description explicitly states when to use this tool versus alternatives: 'For a simple press-and-release use retroarch_input_tap instead.' It also gives detailed frame-accurate scripting guidance, including pausing first, calling for one button, and alternating with retroarch_frame_advance, which is comprehensive and actionable.

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/pythoninthegrass/mcp-retroarch'

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