Skip to main content
Glama

retroarch_input_set_analog

Set an analog stick's X/Y position for a player. Ideal for analog movement, camera control, or pressure-sensitive navigation; values persist until changed, so recenter with (0,0) when done.

Instructions

PURPOSE: Set one analog stick's X/Y position for a player (values persist until changed). USAGE: For analog movement, camera control, or pressure-sensitive navigation on cores that read analog sticks. Values are int16: -32768 (full left/up) to 32767 (full right/down), 0,0 = centered. Like buttons, analog state LATCHES — recenter with (0, 0) or retroarch_input_release_all when done. Sends two datagrams (X then Y), which the receiver applies over two consecutive frames. 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. 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: 'Analog STICK set to (X, Y) (player N)' — UDP-send confirmation only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesHorizontal axis: -32768 = full left, 0 = centered, 32767 = full right.
yYesVertical axis: -32768 = full up, 0 = centered, 32767 = full down.
stickYesWhich analog stick to set.
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?

With no annotations provided, the description fully carries the behavioral burden. It discloses latching (no auto-release), one-datagram-per-frame sequencing, UDP transport without acknowledgment, the requirement for network_remote_enable settings, and that two datagrams are sent consecutively. This is exceptionally transparent for a tool with no structured behavioral 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?

The description is organized into clear labeled sections (PURPOSE, USAGE, BEHAVIOR, Transport, RETURNS) and every sentence adds substantive information. Despite its length, there is no filler — each detail (latching, frame timing, configuration prerequisites) is necessary for correct usage.

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 involving network transport, latching state, and frame-level timing, the description is comprehensive. It covers the return value, network configuration, frame-accurate usage pattern, and the two-receiver behaviors. No output schema exists, but the description fully addresses expected return and side effects, making it contextually complete.

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 already provides 100% coverage with descriptions for each parameter. The description adds meaning beyond the schema by explaining the int16 range semantics, the importance of (0,0) for centering, the two-datagram send order, and the player index default reference. This complements the schema without redundancy.

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 'Set one analog stick's X/Y position for a player', clearly stating the verb (set), resource (analog stick), and scope (player, axes). It identifies this as distinct from button-press tools via 'Like buttons' and from other input tools by focusing on analog sticks, making sibling differentiation clear.

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 provides explicit use cases ('analog movement, camera control, or pressure-sensitive navigation'), latching behavior, and a frame-accurate scripting pattern. While it does not explicitly name alternative tools for when not to use this, it implicitly distinguishes from button inputs and references companion functions (retroarch_input_release_all). This is clear guidance, though a direct exclusion would elevate it.

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