Skip to main content
Glama

gb_lookup_instruction

Find the encoding, bit pattern, opcode bytes, cycles, and flag effects for any Game Boy instruction mnemonic. Resolves exact machine code for decompilation work.

Instructions

Look up how an instruction is encoded, and what it costs.

Returns the bit pattern, every opcode byte in the group, an example decoding, and its cycles and flag effects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mnemonicYes'ld hl, imm16', 'bit', 'rst', 'daa', ...

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

The description discloses the key output contents: bit pattern, opcode bytes, example decoding, cycles, and flag effects. It does not explicitly mention error behavior for unknown mnemonics, but the read-only lookup nature is reasonably clear from the wording.

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 brief and well-structured, with two sentences that cover purpose and return contents without unnecessary detail.

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 lack of an output schema, the description does a good job listing what the caller can expect in the result. It stops short of specifying exact output formatting or handling of invalid mnemonics, but the provided information is sufficient for most lookup use cases.

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 provides a description with examples for the mnemonic parameter, and the tool description does not add substantial additional meaning. The examples give a sense of accepted formats, but no formal syntax or normalization rules are provided.

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 tool looks up how an instruction is encoded and what it costs, distinguishing it from related tools like gb_decode_opcode which likely goes in the opposite direction. The resource is specific: instruction encoding information.

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 explicit guidance is given about when to use this tool versus alternatives such as gb_decode_opcode or gb_opcode_table. The description implies lookup by mnemonic, but it does not state when this is the right choice or when another tool would be preferable.

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