Skip to main content
Glama
renef-mcp
by Ahmeth4n

renef_mem_write

Write bytes or integers directly into a target process's memory, with optional patching for read-only or executable code pages. Supports hex, u8, u16, u32, and u64 types.

Instructions

Write bytes or integers to target process memory (with optional code-page patching).

  • When patch=True (or writing to read-only/executable code pages), uses Memory.patch which automatically handles mprotect and instruction cache flushing.

  • Supports type: "hex" (e.g. "C0035FD6" = ARM64 RET), "u8", "u16", "u32", "u64".

Args: address: Target memory address (e.g., "0x7f8a1c2b0") value: Hex bytes string (for type="hex") or integer string (decimal or "0x..." hex) type: Data type - "hex" (default), "u8", "u16", "u32", "u64" patch: Force Memory.patch (auto mprotect for RX/RO code pages)

Returns: JSON status confirming 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": {
      "address": "<address>",
      "value": "<value>"
    },
    "name": "renef_mem_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNohex
patchNo
valueYes
addressYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden: it does disclose that patching triggers mprotect and instruction cache flushing, which is genuinely useful behavioral context beyond the schema. It omits the risk profile that matters most for a raw memory write — required privileges, what happens on an invalid or unmapped address, and whether a bad write can crash or corrupt the target process.

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?

Front-loaded one-line summary, then two compact behavioral bullets, then an Args block — easy to scan and no filler. The Args lines partially restate the bullets, and the trailing quote artifact adds minor noise, but the structure is sound.

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?

An output schema exists, so return values need not be explained (the description mentions JSON status anyway). For a four-parameter mutation tool with no annotations, though, the definition leaves out error behavior, permission requirements, and any precondition such as needing an active attach — gaps an agent would want before issuing a write.

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

Parameters4/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 largely does: address format is shown by example, value formats are described per type mode, the type parameter is enumerated with its accepted values and default 'hex', and patch is explained functionally. The remaining gap is per-type encoding semantics (endianness, width vs. string length validation).

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?

States a specific verb and resource ('Write bytes or integers to target process memory') plus the distinct patching mode. An agent can immediately separate this from renef_mem_read, renef_mem_dump, and renef_mem_search, which are read/extract operations.

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 second bullet gives real conditional guidance — when patch=True or when targeting read-only/executable pages, mprotect and icache flushing are handled automatically — and the type list implies which format to choose. However, there is no explicit statement of when to use this versus siblings, no prerequisites such as attach state or required privileges, and no guidance on when a write is inadvisable.

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