Skip to main content
Glama

emu_write_mem

Write hex data to emulated memory at a specified address and get the number of bytes written, enabling controlled memory setup for binary function emulation.

Instructions

Write hex data to emulated memory. Returns number of bytes written.

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": {
      "addr": "<addr>",
      "data_hex": "<data_hex>"
    },
    "name": "emu_write_mem"
  }
}

Input Schema

NameRequiredDescriptionDefault
addrYes
data_hexYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and only discloses the return value. It does not say whether the write overwrites existing bytes, what happens at an invalid or unmapped address, whether the write is atomic, or what error behavior to expect — significant gaps for a state-mutating memory operation.

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?

Two short sentences with zero waste; the operation is front-loaded and the return value trails it. Nothing could be cut without losing information.

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?

Although an output schema exists, which reduces the need to explain returns, the definition is thin for a mutation tool with 0% parameter documentation and no annotations. An agent still lacks address format, write semantics, and preconditions required to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the `addr` property has no type at all, so the description must compensate. It clarifies that `data_hex` is hex-encoded, but says nothing about whether `addr` is decimal, hex, or a symbol, nor about length/alignment constraints — leaving the most failure-prone parameter undocumented.

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 states a specific verb and resource ("Write hex data to emulated memory") and adds the return contract ("number of bytes written"). This clearly contrasts with emu_read_mem by operation, though it never names that sibling explicitly to route the agent.

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 guidance on when to use this versus emu_read_mem or emu_load, and no prerequisites are given. It does not say whether the emulator must be loaded, reset, or paused before writing, nor whether writes outside mapped regions are rejected, all of which an agent needs to pick this tool safely.

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