Skip to main content
Glama

capture_leaf_io

Capture a leaf function's input-output behavior by injecting test inputs into its memory word and recording output, registers, and condition flags for differential verification.

Instructions

Golden-vector capture for a pure leaf that transforms one memory word/byte in place (RNG/counter/accumulator). Injects inputs via taps, records output + regs + CCR. Independent oracle for the transpiler differential harness.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoMAME working directory. Defaults to MAME_CWD or current directory.
regsNoRegister names to capture at write-back (e.g. ["D7"]).
pcLowNoLow PC bound identifying 'inside this function' (default entryPc-2).
widthNoOperand width in bytes: 1 or 2.
inputsYesTest input values to inject (integers).
pcHighNoHigh PC bound (default entryPc+0x40).
systemNoMAME machine short name. Defaults to MAME_SYSTEM.
entryPcYesFunction entry address (e.g. 0x412).
logPathNoOptional output log path.
mameExeNoMAME executable. Defaults to MAME_EXE or `mame`.
rompathNoROM search path. Defaults to MAME_ROMPATH.
workdirNoGenerated-script/log directory. Defaults to MAME_WORKDIR or <cwd>/.mame_mcp.
frameCapNoMax frames to run before giving up.
timeoutSecNoProcess timeout in seconds.
varAddressYesAbsolute address of the in/out word the leaf reads then writes (e.g. 0xF0170E).
Behavior2/5

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

No annotations are provided, so the description carries the full burden for behavioral disclosure. It does not mention that the tool launches MAME, requires ROMs, writes scripts/logs, or modifies emulator state. The injection of inputs and recording of CCR suggests side effects, but whether this is safe or reversible is not disclosed. Missing operational details significantly impair trust.

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 description is two sentences, front-loaded with the core purpose, and contains no filler. However, the dense jargon and specialized terminology reduce immediate clarity for a generic agent, making it less accessible than it could be.

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

Completeness2/5

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

Despite having 15 parameters and no output schema, the description is minimal. It does not explain what the tool returns, how to interpret a 'golden-vector', prerequisites like MAME/ROM paths, or the overall workflow. The sibling list suggests integration into a complex pipeline, but the description lacks operational context needed for reliable invocation.

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?

Schema coverage is 100% with per-parameter descriptions, so the baseline is 3. The description adds conceptual context ('one memory word/byte', 'CCR') but doesn't map these to specific parameters or clarify how inputs/taps relate to the schema fields. It provides minimal added value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool captures golden-vector outputs from a pure leaf function that transforms memory in place, and explicitly notes it injects inputs and records output + regs + CCR. It distinguishes itself from siblings like mame_capture_game_tick by focusing on differential-harness oracles, though the heavy jargon ('leaf', 'taps') may be opaque to non-specialists.

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

Usage Guidelines4/5

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

The description identifies a specific use case: serving as an independent oracle for the transpiler differential harness. This implies when to use the tool, though it does not explicitly mention alternatives or exclusions. The context is meaningful but could be more directive.

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/astrobleem/mame-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server