Skip to main content
Glama

is_rom_loaded

Verify if a ROM is loaded in the GameBoy emulator using the MCP GameBoy Server to ensure proper game initialization and control.

Instructions

Check if a ROM is currently loaded in the emulator

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/tools.ts:80-103 (registration)
    Registration and inline handler for the 'is_rom_loaded' MCP tool. Executes the tool logic by checking emulatorService.isRomLoaded() and returning JSON response with loaded status and ROM path.
    server.tool(
      'is_rom_loaded',
      'Check if a ROM is currently loaded in the emulator',
      {},
      async (): Promise<CallToolResult> => {
        const isLoaded = emulatorService.isRomLoaded();
        const romPath = emulatorService.getRomPath();
        
        const responseText: TextContent = {
          type: 'text',
          text: JSON.stringify({
            romLoaded: isLoaded,
            romPath: romPath || null
          })
        };
        
        log.verbose('Checked ROM loaded status', JSON.stringify({ 
          romLoaded: isLoaded, 
          romPath: romPath || null 
        }));
        
        return { content: [responseText] };
      }
    );
  • Helper method in EmulatorService that delegates the ROM loaded check to the underlying GameBoyEmulator instance.
    isRomLoaded(): boolean {
      return this.emulator.isRomLoaded();
    }
  • Core implementation in GameBoyEmulator class that returns the internal romLoaded boolean flag set upon successful ROM loading.
    public isRomLoaded(): boolean {
      return this.romLoaded;
    }
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