Skip to main content
Glama

bizhawk_get_info

Retrieve loaded ROM name, hash, frame count, memory domains, active domain, and available features. Use to confirm system state and capabilities before other emulator operations.

Instructions

PURPOSE: Get the loaded ROM's name and hash, current frame count, the list of available memory domains, the active default domain (the one used when 'domain' is omitted on read/write tool calls), and the bridge's capability map (which optional emu/client/savestate/joypad/memory methods this BizHawk build exposes). USAGE: Call after bizhawk_ping to learn what system is loaded and which optional features are available; before any memory tool call to confirm the active domain and avoid silent reads from the wrong address space; before pause / unpause / reset / screenshot / save_state to check the corresponding capabilities.* flag. BEHAVIOR: No side effects — pure read of emulator metadata. Returns 'unavailable' for fields the loaded core doesn't expose (rom_name when no ROM is loaded, framecount on cores without emu.framecount, etc.). RETURNS: Multi-line text with ROM, ROM hash, framecount, memory_domains list, active domain, and a list of any missing capabilities for this build.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/tools.ts:61-68 (registration)
    Tool registration definition for bizhawk_get_info — a no-side-effect introspection tool that returns ROM name, ROM hash, framecount, available memory domains, active default domain, and capability map of the loaded BizHawk core.
      name: "bizhawk_get_info",
      description:
        "PURPOSE: Get the loaded ROM's name and hash, current frame count, the list of available memory domains, the active default domain (the one used when 'domain' is omitted on read/write tool calls), and the bridge's capability map (which optional emu/client/savestate/joypad/memory methods this BizHawk build exposes). " +
        "USAGE: Call after bizhawk_ping to learn what system is loaded and which optional features are available; before any memory tool call to confirm the active domain and avoid silent reads from the wrong address space; before pause / unpause / reset / screenshot / save_state to check the corresponding `capabilities.*` flag. " +
        "BEHAVIOR: No side effects — pure read of emulator metadata. Returns 'unavailable' for fields the loaded core doesn't expose (rom_name when no ROM is loaded, framecount on cores without emu.framecount, etc.). " +
        "RETURNS: Multi-line text with ROM, ROM hash, framecount, memory_domains list, active domain, and a list of any missing capabilities for this build.",
      inputSchema: { type: "object", properties: {} },
    },
  • Handler for bizhawk_get_info tool — calls BizHawk RPC method 'get_info' via the TCP bridge, then formats the response into a multi-line text string with ROM info, framecount, memory domains, active domain, and missing capabilities.
    case "bizhawk_get_info": {
      const r = await bh.call<{
        rom_name?: string;
        rom_hash?: string;
        framecount?: number;
        memory_domains?: string[];
        current_memory_domain?: string;
        capabilities?: Record<string, boolean>;
      }>("get_info");
      const lines = [
        `ROM:        ${r.rom_name ?? "(unavailable)"}`,
        `ROM hash:   ${r.rom_hash ?? "(unavailable)"}`,
        `Framecount: ${r.framecount ?? "(unavailable)"}`,
      ];
      if (r.memory_domains?.length) {
        lines.push("");
        lines.push(`Memory domains: ${r.memory_domains.join(", ")}`);
        if (r.current_memory_domain) {
          lines.push(`Active domain (used when 'domain' is omitted): ${r.current_memory_domain}`);
        }
      }
      if (r.capabilities) {
        const missing = Object.entries(r.capabilities).filter(([, v]) => !v).map(([k]) => k);
        if (missing.length) {
          lines.push("");
          lines.push(`Missing capabilities on this BizHawk build: ${missing.join(", ")}`);
        }
      }
      return ok(lines.join("\n"));
    }
  • The `call` method on BizhawkServer that enqueues RPC commands (including 'get_info') and returns a promise. This is the transport layer invoked by the tool handler to communicate with the BizHawk Lua bridge over TCP.
    async call<T = unknown>(method: string, params: Record<string, unknown> = {}): Promise<T> {
      return new Promise<T>((resolve, reject) => {
        const id = this.nextId++;
        const pending: PendingCmd = {
          id,
          method,
          params,
          resolve: (r) => resolve(r as T),
          reject,
        };
    
        const timer = setTimeout(() => {
          // Drop from queue if still waiting; from inflight if already sent.
          this.queue   = this.queue.filter((p) => p.id !== id);
          this.inflight.delete(id);
          if (this.inflight.size === 0) this.awaitingResult = false;
          reject(new Error(
            `BizHawk call "${method}" timed out (${this.timeoutMs}ms) — ` +
            `is the bridge.lua script still polling?`,
          ));
        }, this.timeoutMs);
    
        // Wrap so the timer always clears
        const origResolve = pending.resolve, origReject = pending.reject;
        pending.resolve = (r) => { clearTimeout(timer); origResolve(r); };
        pending.reject  = (e) => { clearTimeout(timer); origReject(e); };
    
        this.queue.push(pending);
      });
    }
Behavior5/5

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

The description states 'No side effects — pure read of emulator metadata' and notes that fields return 'unavailable' when not applicable. With no annotations, this fully discloses behavior.

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 PURPOSE, USAGE, BEHAVIOR, RETURNS sections. Each sentence adds value without redundancy.

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 explains the return format and contents in detail. It covers all necessary context for a zero-parameter info tool.

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?

Input schema has no parameters, so schema coverage is 100%. The description adds no parameter info, but baseline for 0 params is 4. Adequate.

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 tool retrieves ROM name, hash, frame count, memory domains, active domain, and capability map. It distinguishes from sibling tools by being pure info, not a control or write action.

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 USAGE section explicitly says to call after bizhawk_ping, before memory tool calls to confirm domain, and before control actions to check capabilities. It provides clear when-to-use guidance.

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

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