Skip to main content
Glama

retroarch_input_release_all

Release all player buttons and analog sticks in a single UDP packet. Reset input state before/after scripts to avoid stuck inputs or recover from unknown button states.

Instructions

PURPOSE: Zero every button and both analog sticks for a player in a single packet — the input panic button. USAGE: Use at the start and end of every scripted input session so no latched button leaks into or out of your script; also as recovery when you have lost track of which buttons are down. Unlike releasing 16 buttons individually (16 datagrams = 16 frames to drain), this clears everything in ONE datagram, applied on the next frame. BEHAVIOR: Implementation detail worth knowing: RetroArch's receiver zeroes all input state for a player whenever it reads a datagram whose size is not exactly sizeof(struct remote_message) — this tool sends a deliberately undersized datagram to trigger exactly that. Documented receiver behavior in input/input_driver.c, stable across RetroArch releases, but it is technically a protocol edge case rather than a designed command. 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. Fire-and-forget UDP — no acknowledgement. RETURNS: 'Released all input (player N)' — UDP-send confirmation only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
playerNoPlayer index, 0-based (see retroarch_input_press). Default 0.
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does so excellently. It discloses the undersized-datagram mechanism, cites the source file, flags it as a protocol edge case, explains the fire-and-forget UDP nature with no acknowledgement, and clarifies transport prerequisites including the separate channel from the NCI port.

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 well-structured with labeled sections (PURPOSE, USAGE, BEHAVIOR, Transport, RETURNS), purpose is front-loaded, and every sentence provides either usage guidance or a critical implementation detail. Despite its length, it is dense and free of redundancy, making it appropriately sized for the tool's complexity.

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?

For a tool with no output schema and no annotations, the description covers the action, usage patterns, underlying behavior, transport prerequisites, and the return string. It also anticipates common questions (e.g., whether Network Commands alone are sufficient) and explicitly addresses them, making it effectively self-contained.

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 covers the 'player' parameter with 100% coverage (0-based, default 0). The description adds meaningful value by explaining that the player index is used to form the destination address ('default 127.0.0.1:55400 + player index'), which is not present in the schema and helps the agent understand how the parameter affects the tool's behavior.

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 a clear, specific verb phrase: 'Zero every button and both analog sticks for a player in a single packet' and labels it the 'input panic button.' It distinguishes itself from sibling tools like 'retroarch_input_release' by emphasizing the 'all' scope and the single-packet mechanism.

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?

Explicitly states when to use it: at the start and end of scripted sessions to prevent leaks, and as recovery when input state is unknown. It also contrasts with the alternative of releasing 16 buttons individually, noting the inefficiency (16 datagrams = 16 frames) and the tool's advantage, making the usage context unambiguous.

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