Skip to main content
Glama

Run ROM in headless emulator (libmgba)

run_emulator

Launch a Game Boy ROM in an emulator with a timed input script. Captures screenshots and returns emulation results like exit code and elapsed time.

Instructions

Launch the ROM via the bundled libmgba-linked gbs-mgba-runner with a scripted input timeline. Captures a PNG at the end (and optionally mid-run). Returns { success, screenshotPath, midScreenshotPath?, exitCode, elapsedMs, stderrTail }. Retrieve the image via the screenshot tool. Build the runner once with mcp-server/native/build.sh (needs a local mGBA checkout); or set GBS_MGBA_RUNNER to an absolute path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputsNoScripted input timeline.
romPathYesAbsolute path to the .gb/.gbc ROM (usually build_rom output).
durationMsNoTotal emulator runtime in milliseconds. Capped at 60s; split into multiple calls for longer walkthroughs.
screenshotAtNoCapture an extra snapshot at this time (ms) in addition to the final frame.
Behavior4/5

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

No annotations provided, so description carries full burden. Reveals output format, optional mid-run screenshot, and setup requirements. Does not detail error handling or stderrTail content.

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 sentences cover launch mechanism, output, retrieval, and setup. No unnecessary words; every sentence earns its place.

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

Completeness4/5

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

Given no annotations, 4 params, and no output schema, the description is largely complete. Covers output structure, retrieval, setup constraints, and parameter limits. Could add more on error scenarios.

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 coverage is 100%, but description adds meaning beyond schema: explains input timeline structure, duration cap, and extra screenshot timing. Provides context for romPath absolute path.

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?

Clearly states it launches a ROM via a scripted runner with input timeline and captures screenshots. Distinguishes from sibling 'screenshot' tool by specifying retrieval method.

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?

Explains when to use (launch ROM with inputs) and provides setup instructions (build runner or set env var). Notes duration cap and suggests splitting for longer walkthroughs, but does not explicitly exclude 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/gbs-toolkit/mcp-server'

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