Skip to main content
Glama

pine_read16

Retrieve a 16-bit unsigned value from emulated PlayStation memory. Ensure address is 2-byte aligned for accurate reads.

Instructions

Read an unsigned 16-bit little-endian value from emulated memory. Address should be 2-byte aligned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesMemory address (2-byte aligned)

Implementation Reference

  • Tool definition (schema) for pine_read16 - declares the tool name, description, and input schema requiring an integer address.
    {
      name: "pine_read16",
      description: "Read an unsigned 16-bit little-endian value from emulated memory. Address should be 2-byte aligned.",
      inputSchema: {
        type: "object",
        required: ["address"],
        properties: { address: { type: "integer", description: "Memory address (2-byte aligned)" } },
      },
    },
  • Handler case in CallToolRequestSchema switch - reads the address argument, calls pine.read16(), and formats the result with hex representation.
    case "pine_read16": return ok(`${addrHex(addr())}: ${fmtHex(await pine.read16(addr()))}`);
  • src/tools.ts:171-177 (registration)
    Registration function that sets up ListToolsRequestSchema (which exposes the TOOLS array including pine_read16) and CallToolRequestSchema (which handles the call).
    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;
  • PineClient.read16() helper - sends a Read16 (opcode 0x01) request over the PINE protocol with the address, then decodes the response as a 16-bit unsigned little-endian integer.
    async read16(addr: number): Promise<number> {
      const args = Buffer.alloc(4); args.writeUInt32LE(addr, 0);
      const r = await this.call(Op.Read16, args);
      return r.readUInt16LE(0);
    }
Behavior3/5

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

With no annotations, the description carries full burden. It mentions alignment (2-byte) and endianness (little-endian), but omits safety implications (read-only is implied but not stated) or error behavior on misalignment.

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?

Single sentence with no extraneous information. Action, target, type, and constraint are all front-loaded and clear.

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

Completeness4/5

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

Given the tool's simplicity (one parameter, no output schema), the description covers key aspects: what is read, size, endianness, alignment. It does not specify the return type, but that is implicitly an integer.

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% with the address parameter already described. The description adds endianness context not present in the schema, improving understanding beyond the parameter description.

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?

Description clearly states it reads an unsigned 16-bit little-endian value from emulated memory. The verb 'read' and resource 'value from emulated memory' are specific, and the bit width and endianness distinguish it from siblings like pine_read8, pine_read32, pine_read64.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives (e.g., pine_read8 or pine_read32). The description does not specify context or prerequisites beyond alignment.

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