Skip to main content
Glama

gb_mbc_decode_write

Decode a ROM-area write to identify the targeted Game Boy MBC banking register, applying documented masking and mode-dependent rules.

Instructions

Identify which banking register a ROM-area write hits.

Turns an opaque ld [$2000], a into "MBC1 ROM Bank Number", with the documented behaviour (masking, the $00->$01 rule, mode dependence) attached.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mbcYesMapper name, e.g. 'MBC1'. Cartridge-type strings work too.
valueNoThe byte written, if known.
addressYesThe address written, e.g. '$2000'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

The description discloses that documented behavior (masking, the $00->$01 rule, and mode dependence) is attached, and it names the input/output relationship. With no annotations provided, however, it stops short of describing the actual output format, error behavior, or side effects.

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 two sentences with no filler, redundant schema text, or irrelevant detail. The example is compact and directly supports the stated purpose.

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?

The core context is present, but because there is no output schema and no annotations, the description leaves unspecified the exact return shape, failure cases (e.g., unsupported MBC or non-ROM address), and how the attached documented behavior is represented in the result.

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 already covers all parameters, and the description reinforces their meaning by mapping `ld [$2000], a` to the address and value parameters. It adds only modest context beyond the schema, and it does not elaborate on how the `mbc` parameter's value influences the result.

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 verb ('Identify'), the object ('which banking register'), and the scope ('a ROM-area write'). It also gives a concrete example (`ld [$2000], a` → 'MBC1 ROM Bank Number'), making the tool's purpose unambiguous.

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 when to use the tool—when decoding an opaque ROM-area write—and provides an illustrative example. However, it does not explicitly contrast it with sibling tools such as gb_mbc_info or gb_lookup_register, nor does it state prerequisites or non-goals.

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