Skip to main content
Glama

mgba_advance_frames

Advance emulator frames by a specified count for precise timing in tests. Avoids event loop interruption to maintain accuracy.

Instructions

Advance emulation by N frames without returning to the event loop. Useful for precise timing in tests.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of frames to advance (default 1)

Implementation Reference

  • Defines the input schema for mgba_advance_frames, accepting an optional 'count' integer (min 1, default 1).
    {
      name: "mgba_advance_frames",
      description: "Advance emulation by N frames without returning to the event loop. Useful for precise timing in tests.",
      inputSchema: {
        type: "object",
        properties: {
          count: { type: "integer", minimum: 1, default: 1, description: "Number of frames to advance (default 1)" },
        },
      },
    },
  • Handler that calls the mGBA bridge's 'advance_frames' RPC method with the count parameter and returns the resulting frame number.
    case "mgba_advance_frames": {
      const frame = await mgba.call<number>("advance_frames", { count: p.count ?? 1 });
      return ok(`Advanced ${p.count ?? 1} frame(s). Current frame: ${frame}`);
    }
  • src/tools.ts:258-259 (registration)
    Registration function that registers the tools list (which includes mgba_advance_frames) with the MCP server via ListToolsRequestSchema.
    export function registerTools(server: Server, mgba: MgbaClient): void {
      server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
Behavior4/5

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

Without annotations, the description carries full burden. It discloses a key behavioral aspect (no event loop return) and purpose, though it omits potential side effects like interrupting breakpoints.

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?

Two concise sentences that are front-loaded with the core action, no 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?

Given the single parameter, no output schema, and clear sibling context, the description is sufficiently complete for an agent to understand and invoke the tool correctly.

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 parameter well (100% coverage), and the description adds relevance ('N frames', 'precise timing'), adding value beyond 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 clearly states the action ('advance emulation by N frames') and distinguishes it from siblings like mgba_get_info or mgba_pause, which have different purposes.

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?

The description mentions 'without returning to the event loop' and 'useful for precise timing in tests,' giving context for when to use it, though it doesn't explicitly state when not to use or name alternatives.

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-mgba'

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