Skip to main content
Glama

press_right

Simulate pressing the RIGHT button on a GameBoy emulator using the MCP GameBoy Server. Specify the duration in frames for precise control during gameplay or testing.

Instructions

Press the RIGHT button on the GameBoy

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
duration_framesNoNumber of frames to hold the button

Implementation Reference

  • The core handler logic for the 'press_right' tool (shared with other press_ buttons). It calls emulatorService.pressButton('RIGHT', duration_frames) and returns the current screen as ImageContent.
    async ({ duration_frames }): Promise<CallToolResult> => {
      // Press the button using the service (advances one frame)
      emulatorService.pressButton(button, duration_frames);
    
      // Return the current screen using the service
      const screen = emulatorService.getScreen();
      return { content: [screen] };
    }
  • Input schema for press_right tool using Zod validation for duration_frames parameter.
    {
      duration_frames: z.number().int().positive().optional().default(1).describe('Number of frames to hold the button').default(25)
    },
  • src/tools.ts:21-37 (registration)
    Dynamic registration of press_right (and other direction/button) tools via loop over GameBoyButton enum values.
    Object.values(GameBoyButton).forEach(button => {
      server.tool(
        `press_${button.toLowerCase()}`,
        `Press the ${button} button on the GameBoy`,
        {
          duration_frames: z.number().int().positive().optional().default(1).describe('Number of frames to hold the button').default(25)
        },
        async ({ duration_frames }): Promise<CallToolResult> => {
          // Press the button using the service (advances one frame)
          emulatorService.pressButton(button, duration_frames);
    
          // Return the current screen using the service
          const screen = emulatorService.getScreen();
          return { content: [screen] };
        }
      );
    });
  • Top-level registration call in createGameBoyServer that invokes the tools registration including press_right.
    // Register GameBoy tools
    registerGameBoyTools(server, emulatorService); // Pass emulatorService
  • GameBoyButton enum defining 'RIGHT' which generates the 'press_right' tool name when lowercased.
    export enum GameBoyButton {
      UP = 'UP',
      DOWN = 'DOWN',
      LEFT = 'LEFT',
      RIGHT = 'RIGHT',
      A = 'A',
      B = 'B',
      START = 'START',
      SELECT = 'SELECT'
    }
Behavior2/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 of behavioral disclosure. It states the action but lacks details on effects (e.g., how it interacts with the GameBoy state), error conditions, or performance traits. The description is minimal and does not compensate for the absence of annotations.

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 a single, clear sentence with zero waste, front-loading the essential action. It is appropriately sized for a simple tool and efficiently communicates the purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one optional parameter, no output schema, no annotations), the description is minimally adequate but lacks context on behavioral aspects. It covers the basic action but does not provide completeness for a tool that interacts with a system (GameBoy), leaving gaps in understanding effects or usage scenarios.

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

Parameters3/5

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

The schema description coverage is 100%, with the parameter 'duration_frames' fully documented in the schema. The description does not add any parameter semantics beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage without extra value.

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 clearly states the specific action ('Press') and target resource ('the RIGHT button on the GameBoy'), distinguishing it from sibling tools like press_a, press_b, press_left, etc. It precisely identifies what the tool does without ambiguity.

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

Usage Guidelines3/5

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

The description implies usage for pressing the right button in a GameBoy context, but provides no explicit guidance on when to use this tool versus alternatives (e.g., press_left, press_up) or any prerequisites. Usage is inferred from the action and sibling names, but not explicitly stated.

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

Related 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/mario-andreschak/mcp-gameboy'

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