Skip to main content
Glama

pine_write16

Write a 16-bit little-endian value to a 2-byte aligned memory address in emulated RAM for PlayStation-family emulators.

Instructions

Write a 16-bit value (LE) to emulated RAM. Address must be 2-byte aligned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesMemory address (2-byte aligned)
valueYes

Implementation Reference

  • Tool definition (name + inputSchema) for pine_write16 — declares it writes a 16-bit LE value to a 2-byte aligned address, with value range 0-65535.
    {
      name: "pine_write16",
      description: "Write a 16-bit value (LE) to emulated RAM. Address must be 2-byte aligned.",
      inputSchema: {
        type: "object",
        required: ["address", "value"],
        properties: {
          address: { type: "integer", description: "Memory address (2-byte aligned)" },
          value:   { type: "integer", minimum: 0, maximum: 65535 },
        },
      },
    },
  • Handler for pine_write16 — calls pine.write16(addr, value) and returns a confirmation message.
    case "pine_write16": {
      await pine.write16(addr(), p.value as number);
      return ok(`Wrote ${fmtHex(p.value as number)} → ${addrHex(addr())}`);
    }
  • Low-level PineClient.write16 — builds a 6-byte buffer (4-byte LE address + 2-byte LE value) and sends it via the PINE protocol with opcode Op.Write16 (0x05).
    async write16(addr: number, val: number): Promise<void> {
      const args = Buffer.alloc(6);
      args.writeUInt32LE(addr, 0);
      args.writeUInt16LE(val, 4);
      await this.call(Op.Write16, args);
    }
  • src/tools.ts:171-172 (registration)
    Registration of all tools via ListToolsRequestSchema handler, which serves the TOOLS array (including pine_write16).
    export function registerTools(server: Server, pine: PineClient): void {
      server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses alignment requirement and endianness but does not mention side effects, persistence, or permissions. For a write operation, more context is needed.

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 concise sentences with no redundant information. Essential details are front-loaded.

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

Completeness3/5

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

Description covers core purpose and alignment constraint but omits behavioral context (e.g., what 'emulated RAM' means, whether write is persistent, potential error conditions). No output schema, so return value is unexplained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50% (address described, value not). Description repeats address alignment but adds nothing about value beyond schema. Value parameter lacks semantic explanation (e.g., range context given by schema min/max).

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 writes a 16-bit value (little-endian) to emulated RAM. Distinguishes from siblings like pine_read16 and pine_write8 by specifying bit width and operation.

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?

Implied context: use for writing 16-bit values to RAM. But no explicit when-to-use, when-not-to-use, or comparison with alternative tools like pine_write8 or pine_write32.

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