Skip to main content
Glama
dmang-dev

mcp-dolphin

dolphin_press_gc_buttons

Set GameCube controller state for one frame. Specify buttons and axes to press; omitted inputs are released. Use with frame advance for TAS sequences.

Instructions

PURPOSE: Set GameCube controller state on a given port for one frame's worth of input. USAGE: Buttons supported: A, B, X, Y, Z, Start, L, R, Up, Down, Left, Right. Analog axes: StickX, StickY, CStickX, CStickY, TriggerLeft, TriggerRight. To 'hold' a button across multiple frames, call repeatedly — Dolphin's input is per-frame, not edge-triggered, so a button you don't include in this call's state is implicitly released. For TAS-style frame-perfect sequences, alternate set + dolphin_frame_advance(1) calls. BEHAVIOR: DESTRUCTIVE to controller state for the addressed port. Overwrites all input — anything you don't include is released. Felk's set_gc_buttons accepts a partial dict; unspecified buttons are false, unspecified analog axes are at neutral (0 for both sticks and triggers). RETURNS: 'Set GC port N: '.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoGameCube controller port (0-3, defaults to 0 for port 1). Wii games sometimes accept GC controllers — try port 0 if unsure.
stateYesButton/axis state object. Boolean keys for digital buttons (A, B, X, Y, Z, Start, L, R, Up, Down, Left, Right). Integer keys for analog axes — StickX/StickY/CStickX/CStickY accept -128..127 (0 = center), TriggerLeft/TriggerRight accept 0..255 (0 = released). Omit a key to leave it at neutral (false / 0).

Implementation Reference

  • The handler function for the 'dolphin_press_gc_buttons' tool. It reads the port (defaulting to 0), extracts the state object, calls the Dolphin bridge's 'controller.set_gc_buttons' method, and returns a summary string.
    case "dolphin_press_gc_buttons": {
      const port = (p.port as number | undefined) ?? 0;
      const state = p.state as Record<string, unknown>;
      await dol.call("controller.set_gc_buttons", [port, state]);
      const keys = Object.keys(state).join(",") || "(empty)";
      return ok(`Set GC port ${port}: ${keys}`);
    }
  • Input schema for the 'dolphin_press_gc_buttons' tool. Defines 'port' (integer 0-3, optional) and 'state' (object with boolean button names and integer analog axes) as input. Lists supported GC button names and analog axes.
    {
      name: "dolphin_press_gc_buttons",
      description:
        "PURPOSE: Set GameCube controller state on a given port for one frame's worth of input. " +
        `USAGE: Buttons supported: ${GC_BUTTON_NAMES}. Analog axes: ${GC_ANALOG_NAMES}. ` +
        "To 'hold' a button across multiple frames, call repeatedly — Dolphin's input is per-frame, not edge-triggered, so a button you don't include in this call's state is implicitly released. For TAS-style frame-perfect sequences, alternate set + dolphin_frame_advance(1) calls. " +
        "BEHAVIOR: DESTRUCTIVE to controller state for the addressed port. Overwrites all input — anything you don't include is released. Felk's set_gc_buttons accepts a partial dict; unspecified buttons are false, unspecified analog axes are at neutral (0 for both sticks and triggers). " +
        "RETURNS: 'Set GC port N: <state-summary>'.",
      inputSchema: {
        type: "object",
        required: ["state"],
        properties: {
          port: {
            type: "integer",
            minimum: 0,
            maximum: 3,
            description: "GameCube controller port (0-3, defaults to 0 for port 1). Wii games sometimes accept GC controllers — try port 0 if unsure.",
          },
          state: {
            type: "object",
            additionalProperties: true,
            description:
              "Button/axis state object. Boolean keys for digital buttons (A, B, X, Y, Z, Start, L, R, Up, Down, Left, Right). " +
              "Integer keys for analog axes — StickX/StickY/CStickX/CStickY accept -128..127 (0 = center), " +
              "TriggerLeft/TriggerRight accept 0..255 (0 = released). Omit a key to leave it at neutral (false / 0).",
          },
        },
        additionalProperties: false,
      },
    },
  • src/tools.ts:62-62 (registration)
    The tool is registered as part of the TOOLS array (line 62) which is used to respond to ListToolsRequestSchema and CallToolRequestSchema. The entry at line 274-303 is one item in this array.
    const TOOLS: Tool[] = [
  • The Python bridge handler that calls Felk's dolphin.controller.set_gc_buttons(port, state) to actually set the GameCube controller buttons in Dolphin.
    def _set_gc_buttons(p):       controller.set_gc_buttons(p[0], p[1]); return None
  • Registration of 'controller.set_gc_buttons' method in the bridge's HANDLERS dict, mapping the RPC method name to the _set_gc_buttons helper function.
    "controller.set_gc_buttons":      _set_gc_buttons,
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: it states 'DESTRUCTIVE to controller state for the addressed port. Overwrites all input — anything you don't include is released.' It also explains default values for unspecified fields (false for buttons, 0 for axes).

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 clear sections (PURPOSE, USAGE, BEHAVIOR, RETURNS). Every sentence is necessary and informative, no redundancy or fluff.

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?

Given no output schema, the description includes a return format hint. It covers all aspects: purpose, usage, behavior, parameters, and return value. For a 2-parameter tool with a nested object, this is complete and leaves no ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the description adds significant meaning beyond the schema: it lists exact button names, specifies integer ranges for analog axes (-128..127 for sticks, 0..255 for triggers), and clarifies that omitting a key leaves it at neutral. This provides actionable detail not in the schema.

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 begins with 'PURPOSE: Set GameCube controller state on a given port for one frame's worth of input.' This clearly states the specific verb (Set), resource (GameCube controller state), and scope (one frame, given port). It distinguishes from sibling tools like dolphin_press_wiimote_buttons.

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 provides explicit usage instructions: lists supported buttons and axes, explains how to hold buttons across frames by calling repeatedly, and refers to alternating with dolphin_frame_advance for TAS sequences. It gives clear context for when to use this tool and how to combine with siblings.

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/dmang-dev/mcp-dolphin'

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