Skip to main content
Glama

emu_run

Emulate one binary function in isolation with supplied arguments and memory inputs to verify a reverse-engineering hypothesis and inspect return values, registers, instruction count, and stop reason.

Instructions

Emulate a single function in isolation and return its result.

Use after you have guessed what a function does, to verify the guess against known inputs. args are passed per calling convention (floats go to the floating point argument registers); mem_inputs maps addresses (hex/dec strings) to hex byte data pre-written to memory. Returns return value, main registers, instruction count and stop reason. No syscalls/filesystem/network are emulated; unknown calls stop execution.

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": {
      "func_addr": "<func_addr>"
    },
    "name": "emu_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsNo
func_addrYes
max_insnsNo
mem_inputsNo
timeout_msNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does well: it discloses that syscalls, filesystem and network are not emulated, that unknown calls stop execution, and that memory is pre-written via mem_inputs before the run. It does not say whether emulator state persists between calls or how timeout_ms interacts with max_insns, which are meaningful gaps for an emulation tool.

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 core purpose is front-loaded in the first sentence and the operational caveats follow in a compact block. Every sentence carries information; there is no filler or repetition.

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?

An output schema exists, yet the description still usefully previews the return payload (return value, registers, instruction count, stop reason). The main missing piece is emulator state lifetime across calls, which matters given siblings like emu_reset and emu_load.

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 description coverage is 0%, so the description must compensate and it only partly does. It explains args ('passed per calling convention, floats go to the floating point argument registers') and mem_inputs ('maps addresses (hex/dec strings) to hex byte data'), but func_addr, max_insns and timeout_ms receive no explanation beyond their names.

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 gives a specific verb and resource: 'Emulate a single function in isolation and return its result.' The 'in isolation' phrasing implicitly separates it from broader emulation siblings such as emu_trace, but no sibling is named explicitly, so differentiation is inferred rather than stated.

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?

It states a clear usage context: 'Use after you have guessed what a function does, to verify the guess against known inputs.' That is genuine when-to-use guidance. It does not name an alternative tool or state when not to use this one, which keeps it short of a 5.

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