Skip to main content
Glama

pine_read64

Read a 64-bit unsigned little-endian value from PlayStation emulator memory at an aligned address. Returns decimal string for full precision beyond JavaScript's 2^53 limit.

Instructions

PURPOSE: Read an unsigned 64-bit little-endian value from the emulator's EE main address space at the given absolute address. USAGE: Use for true 64-bit fields — full pointers, large IDs, packed double-word state. The PS2 EE is a 128-bit MIPS where 64-bit slots are common; PS1 and PS3 use 64-bit less heavily but the opcode still works. Reach for this rather than chaining two pine_read32 calls when you want atomicity. For 8/16/32-bit values use the corresponding sibling; for byte spans use pine_read_range. BEHAVIOR: No side effects — pure read. Reads eight consecutive bytes starting at address and combines them as little-endian. Address MUST be 8-byte aligned. PINE on PCSX2 does NOT enforce alignment — unaligned access typically returns whatever bytes are at the aligned address below, silently corrupting the value. If you need an unaligned multi-byte read, use pine_read_range and assemble the bytes yourself. The result is returned as a decimal STRING (not a JSON number) to preserve precision past 2^53 (JavaScript number limit) — parse with BigInt if you need to do arithmetic. Returns a PINE FAIL response on unmapped addresses; times out after ~10s if the reply is dropped.

PlayStation 2 main address space landmarks (PCSX2): 0x00100000-0x01FFFFFF EE main RAM (32 MiB) — game code & data; the most common target 0x10000000 Hardware registers (DMA, GIF, VIF, etc.) 0x11000000 VU0 / VU1 memory 0x12000000 GS privileged registers 0x1C000000-0x1C1FFFFF IOP RAM (2 MiB) 0x1F800000 IOP scratchpad 0x70000000 EE scratchpad (16 KiB) PINE memory operations target the EE address space.

RETURNS: Single line 'ADDR_HEX: VAL_DEC (0xVAL_HEX)' — VAL_DEC is a decimal string that may exceed 2^53.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesAbsolute byte address in the EE main address space (NOT a per-domain offset). Pass as a number; hex literals like 0x00200000 are fine. Reads 8 consecutive bytes starting here. MUST be 8-byte aligned (address % 8 === 0). PINE on PCSX2 does NOT enforce alignment — unaligned access typically returns whatever bytes are at the aligned address below, silently corrupting the value. If you need an unaligned multi-byte read, use pine_read_range and assemble the bytes yourself. Useful range: 0x00100000-0x01FFFFFF for EE main RAM (where 99% of game state lives). An unmapped or invalid address returns a PINE FAIL response.

Implementation Reference

  • src/tools.ts:143-158 (registration)
    Tool 'pine_read64' is registered in the tools array with name, description, and inputSchema.
    {
      name: "pine_read64",
      description:
        `PURPOSE: Read an unsigned 64-bit little-endian value from the emulator's ${ADDR_SPACE} at the given absolute address. ` +
        "USAGE: Use for true 64-bit fields — full pointers, large IDs, packed double-word state. The PS2 EE is a 128-bit MIPS where 64-bit slots are common; PS1 and PS3 use 64-bit less heavily but the opcode still works. Reach for this rather than chaining two pine_read32 calls when you want atomicity. For 8/16/32-bit values use the corresponding sibling; for byte spans use pine_read_range. " +
        "BEHAVIOR: No side effects — pure read. Reads eight consecutive bytes starting at `address` and combines them as little-endian. Address MUST be 8-byte aligned. " + target.alignmentNote + " The result is returned as a decimal STRING (not a JSON number) to preserve precision past 2^53 (JavaScript number limit) — parse with BigInt if you need to do arithmetic. Returns a PINE FAIL response on unmapped addresses; times out after ~10s if the reply is dropped.\n\n" +
        MEM + "\n\n" +
        "RETURNS: Single line 'ADDR_HEX: VAL_DEC (0xVAL_HEX)' — VAL_DEC is a decimal string that may exceed 2^53.",
      inputSchema: {
        type: "object",
        required: ["address"],
        properties: {
          address: { type: "integer", minimum: 0, description: addressParamDesc(target, 8) },
        },
        additionalProperties: false,
      },
  • Input schema for pine_read64: requires 'address' (integer, minimum 0, 8-byte aligned).
    inputSchema: {
      type: "object",
      required: ["address"],
      properties: {
        address: { type: "integer", minimum: 0, description: addressParamDesc(target, 8) },
      },
      additionalProperties: false,
    },
  • Handler for pine_read64: calls pine.read64(addr()), formats output as 'ADDR_HEX: VAL_DEC (0xVAL_HEX)'.
    case "pine_read64": return ok(`${addrHex(addr())}: ${fmtHex(await pine.read64(addr()))}`);
  • PineClient.read64(): sends Read64 opcode (0x03) with 4-byte address arg, reads 8-byte little-endian bigint from reply.
    async read64(addr: number): Promise<bigint> {
      const args = Buffer.alloc(4); args.writeUInt32LE(addr, 0);
      const r = await this.call(Op.Read64, args);
      return r.readBigUInt64LE(0);
    }
  • Read64 opcode constant (0x03) used in the PINE protocol.
    Read64:       0x03,
Behavior5/5

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

With no annotations, the description fully covers behavioral traits: no side effects (pure read), alignment requirement (8-byte), unaligned corruption behavior, timeout (~10s), error on unmapped addresses, and return format (decimal string with hex).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (PURPOSE, USAGE, BEHAVIOR, memory map, RETURNS). It is slightly verbose but every sentence adds value, covering alignment, siblings, and return format. Could be trimmed marginally but is effective.

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 thoroughly explains the return format (single line with hex address, decimal value, hex value) and precision note (decimal string to avoid JavaScript number limits). It also includes a memory map for context. The tool has only one parameter and is well-covered.

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% and the description adds significant context beyond the schema: it explains alignment requirement (must be 8-byte aligned and what happens if not), provides useful address range landmarks, and clarifies that unmapped addresses return a PINE FAIL response. The schema already describes the parameter, so 4 is appropriate.

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 explicitly states the tool reads an unsigned 64-bit little-endian value from the EE main address space, with a clear verb ('Read') and resource ('unsigned 64-bit little-endian value'). It distinguishes from siblings like pine_read8/16/32 and pine_read_range by specifying bit-width and atomicity.

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 description gives explicit guidance: use for true 64-bit fields (full pointers, large IDs) and when atomicity is needed (rather than chaining two pine_read32). It also advises against unaligned reads, directing to pine_read_range instead. Alternatives (siblings) are named for 8/16/32-bit reads.

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