Skip to main content
Glama

pine_get_info

Get the loaded game's title, serial, disc CRC, game version, and emulator status from a PINE-compatible emulator.

Instructions

Get the loaded game's title, serial (e.g. SLUS-21274), disc CRC, game version, and emulator status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool definition / inputSchema for 'pine_get_info' — declares name, description, and an empty input schema (no parameters).
      name: "pine_get_info",
      description: "Get the loaded game's title, serial (e.g. SLUS-21274), disc CRC, game version, and emulator status.",
      inputSchema: { type: "object", properties: {} },
    },
  • Handler case for 'pine_get_info' — calls pine.getTitle(), pine.getId(), pine.getUuid(), pine.getGameVersion(), and pine.getStatus() in parallel, then formats the results into a text response.
    case "pine_get_info": {
      const [title, id, uuid, gameVer, status] = await Promise.all([
        pine.getTitle().catch(() => "(unavailable)"),
        pine.getId().catch(() => "(unavailable)"),
        pine.getUuid().catch(() => "(unavailable)"),
        pine.getGameVersion().catch(() => "(unavailable)"),
        pine.getStatus(),
      ]);
      return ok(
        `Title:        ${title}\n` +
        `Serial:       ${id}\n` +
        `Disc CRC:     ${uuid}\n` +
        `Game version: ${gameVer}\n` +
        `Status:       ${status}`,
      );
    }
  • src/tools.ts:171-249 (registration)
    Registration via registerTools() — sets up the CallToolRequestSchema handler that dispatches via switch/case to the 'pine_get_info' handler.
    export function registerTools(server: Server, pine: PineClient): void {
      server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
    
      server.setRequestHandler(CallToolRequestSchema, async (req) => {
        const { name, arguments: args = {} } = req.params;
        const p = args as Record<string, unknown>;
        const addr = () => p.address as number;
    
        switch (name) {
          case "pine_ping": {
            const v = await pine.getVersion();
            return ok(`OK — emulator: ${v}`);
          }
    
          case "pine_get_info": {
            const [title, id, uuid, gameVer, status] = await Promise.all([
              pine.getTitle().catch(() => "(unavailable)"),
              pine.getId().catch(() => "(unavailable)"),
              pine.getUuid().catch(() => "(unavailable)"),
              pine.getGameVersion().catch(() => "(unavailable)"),
              pine.getStatus(),
            ]);
            return ok(
              `Title:        ${title}\n` +
              `Serial:       ${id}\n` +
              `Disc CRC:     ${uuid}\n` +
              `Game version: ${gameVer}\n` +
              `Status:       ${status}`,
            );
          }
    
          case "pine_get_status": {
            return ok(`Status: ${await pine.getStatus()}`);
          }
    
          case "pine_read8":  return ok(`${addrHex(addr())}: ${fmtHex(await pine.read8(addr()))}`);
          case "pine_read16": return ok(`${addrHex(addr())}: ${fmtHex(await pine.read16(addr()))}`);
          case "pine_read32": return ok(`${addrHex(addr())}: ${fmtHex(await pine.read32(addr()))}`);
          case "pine_read64": return ok(`${addrHex(addr())}: ${fmtHex(await pine.read64(addr()))}`);
    
          case "pine_write8": {
            await pine.write8(addr(), p.value as number);
            return ok(`Wrote ${fmtHex(p.value as number)} → ${addrHex(addr())}`);
          }
          case "pine_write16": {
            await pine.write16(addr(), p.value as number);
            return ok(`Wrote ${fmtHex(p.value as number)} → ${addrHex(addr())}`);
          }
          case "pine_write32": {
            await pine.write32(addr(), p.value as number);
            return ok(`Wrote ${fmtHex(p.value as number)} → ${addrHex(addr())}`);
          }
          case "pine_write64": {
            const v = BigInt(p.value as string);
            await pine.write64(addr(), v);
            return ok(`Wrote ${fmtHex(v)} → ${addrHex(addr())}`);
          }
    
          case "pine_read_range": {
            const bytes = await pine.readRange(p.address as number, p.length as number);
            const hex = Array.from(bytes)
              .map((b) => b.toString(16).padStart(2, "0").toUpperCase())
              .join(" ");
            return ok(`${addrHex(p.address as number)} [${bytes.length} bytes]:\n${hex}`);
          }
    
          case "pine_save_state": {
            await pine.saveState(p.slot as number);
            return ok(`Save state triggered for slot ${p.slot}`);
          }
          case "pine_load_state": {
            await pine.loadState(p.slot as number);
            return ok(`Load state triggered for slot ${p.slot}`);
          }
    
          default:
            throw new Error(`Unknown tool: ${name}`);
        }
      });
  • Helper methods on PineClient used by the handler: getTitle(), getId(), getUuid(), getGameVersion() — each reads a string via the PINE protocol.
    async getVersion():     Promise<string> { return this.readString(Op.Version); }
    async getTitle():       Promise<string> { return this.readString(Op.Title); }
    async getId():          Promise<string> { return this.readString(Op.ID); }
    async getUuid():        Promise<string> { return this.readString(Op.UUID); }
    async getGameVersion(): Promise<string> { return this.readString(Op.GameVersion); }
  • Helper method getStatus() on PineClient — reads emulator status via PINE protocol and maps numeric codes to strings.
    async getStatus(): Promise<EmuStatus> {
      const r = await this.call(Op.Status);
      const s = r.readUInt32LE(0);
      return s === 0 ? "running" : s === 1 ? "paused" : s === 2 ? "shutdown" : "unknown";
    }
Behavior4/5

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

With no annotations, the description bears the full burden. It explicitly lists all returned fields, which is sufficient for a read-only info tool. However, it does not mention potential errors, latency, or whether it requires a game to be loaded.

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?

A single sentence that immediately conveys the tool's output. No extraneous information. Perfectly concise and front-loaded.

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 absence of an output schema, the description fully enumerates all return fields (title, serial, disc CRC, game version, emulator status). This is complete for a simple getter tool. No gaps.

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 input schema has zero parameters, so the description need not add parameter details. According to the rubric, 0 parameters baseline is 4. The description is 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 it retrieves specific game metadata (title, serial, disc CRC, version, emulator status). The verb 'Get' plus the enumerated fields make the purpose unambiguous and distinguish it from sibling tools like pine_get_status.

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?

No explicit when-to-use or when-not-to-use guidance is provided. The description implies it is for querying the currently loaded game's info, but does not mention alternatives or conditions (e.g., 'use pine_get_status for live emulator state').

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

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