Skip to main content
Glama

pine_save_state

Save the current emulator state to a numbered slot for later restoration.

Instructions

Trigger the emulator to save its current state to a numbered slot.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slotYesSave state slot (0-255)

Implementation Reference

  • The tool handler for 'pine_save_state' — the actual MCP request handler that calls pine.saveState(slot) and returns a confirmation message.
    case "pine_save_state": {
      await pine.saveState(p.slot as number);
      return ok(`Save state triggered for slot ${p.slot}`);
    }
  • The tool schema/definition registration for 'pine_save_state', including description and inputSchema requiring a 'slot' integer (0-255).
      name: "pine_save_state",
      description: "Trigger the emulator to save its current state to a numbered slot.",
      inputSchema: {
        type: "object",
        required: ["slot"],
        properties: {
          slot: { type: "integer", minimum: 0, maximum: 255, description: "Save state slot (0-255)" },
        },
      },
    },
  • src/tools.ts:171-172 (registration)
    The registerTools function that registers all tools (including pine_save_state) via ListToolsRequestSchema and handles tool calls via CallToolRequestSchema.
    export function registerTools(server: Server, pine: PineClient): void {
      server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
  • The PineClient.saveState() helper method that encodes the slot number into a 1-byte buffer and sends it with the SaveState opcode (0x09) via the PINE protocol.
    async saveState(slot: number): Promise<void> {
      const args = Buffer.alloc(1); args.writeUInt8(slot, 0);
      await this.call(Op.SaveState, args);
    }
  • The SaveState opcode constant (0x09) defined in the Op enum of the PINE protocol client.
      SaveState:    0x09,
      LoadState:    0x0A,
      Title:        0x0B,
      ID:           0x0C,
      UUID:         0x0D,
      GameVersion:  0x0E,
      Status:       0x0F,
    } as const;
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavior. It only states the basic operation, omitting whether saving overwrites existing slots, requires specific permissions, or any side effects. This is minimal transparency for a mutation tool.

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?

The description is a single sentence with 10 words, front-loads the verb, and conveys the essential action without redundancy. Every word contributes.

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?

For a simple single-parameter tool with no output schema, the description adequately covers the action. However, it could mention whether the operation returns a confirmation or error, and if the emulator must be running. This minor gap prevents a 5.

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?

The schema description covers the parameter fully (0-255 slot). The description adds no extra meaning beyond 'numbered slot', which repeats schema info. Baseline score of 3 applies due to high schema coverage.

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 the action ('save') and resource ('emulator state') with a specific scope ('to a numbered slot'). It effectively distinguishes from sibling tool 'pine_load_state' by using the verb 'save' versus load.

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?

The description implies use for saving state but provides no explicit guidance on when to use this tool versus alternatives (e.g., load_state) or prerequisites like emulator running. No exclusions mentioned.

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