Skip to main content
Glama

gb_set_register

Set Game Boy CPU registers (A, B, C, D, E, F, H, L, SP, PC) to specific values for debugging or modifying emulator state.

Instructions

Set a CPU register to a specific value.

    Supported registers: A, B, C, D, E, F, H, L, SP, PC.
    8-bit registers accept 0x00-0xFF, 16-bit (SP, PC) accept
    0x0000-0xFFFF. Writing to F masks to upper nibble (0xF0).
    

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "register": "<register>",
      "value": "<value>"
    },
    "name": "gb_set_register"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueYes
registerYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses value ranges per register width and the F-register upper-nibble masking, but it does not state what happens when writing PC or SP (e.g., whether execution flow changes), whether invalid registers are rejected, or whether this mutates saved state.

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 definition is short and front-loaded with the core action, then the register list and range constraints. The line breaks are slightly awkward but every sentence carries useful information.

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?

For a two-parameter mutation tool with no annotations and no output schema, the description covers the register set and value constraints but omits key behavioral context: error handling for unsupported registers and the execution-flow implications of writing PC/SP.

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 description coverage is 0%, so the description must compensate. It does so well by naming the valid register set and giving concrete value ranges (0x00-0xFF for 8-bit, 0x0000-0xFFFF for SP/PC), plus the F masking rule; only edge cases like case sensitivity are unaddressed.

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 states a specific verb and resource ('Set a CPU register to a specific value') and enumerates the supported registers, making it immediately distinguishable from the read-side sibling gb_get_registers.

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?

Usage is implied by the verb 'Set' and the register list, but the description gives no explicit when-to-use guidance, no when-not conditions, and does not point to alternatives such as gb_get_registers or gb_step for reading/advancing state.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.