Skip to main content
Glama

renef_mem_patch

Writes raw bytes to target memory using Memory.patch, handling mprotect internally to modify read-only code pages that standard memory writes cannot touch.

Instructions

Write raw bytes to target memory using Memory.patch, which handles mprotect internally (works on read-only code pages that renef_mem_write cannot touch). hex_bytes: hex string, spaces allowed.

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>",
      "hex_bytes": "<hex_bytes>"
    },
    "name": "renef_mem_patch"
  }
}

Input Schema

NameRequiredDescriptionDefault
addrYes
hex_bytesYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden, and it does disclose a key trait: mprotect is handled internally so read-only pages are writable. However, it says nothing about the destructive/irreversible nature of raw memory writes, permission or attach requirements, or failure modes on bad addresses.

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?

Two compact sentences with the capability and the differentiator front-loaded, and no filler. The trailing parameter note is slightly tacked-on but still earns its place by clarifying input format.

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?

For a two-parameter mutation tool with an output schema (so return values need no explanation) and no annotations, the description covers purpose, the key behavioral edge (read-only pages), and one parameter format. The main gap is the addr parameter's expected format and the lack of any safety caveat for a raw memory write.

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. It does explain hex_bytes (hex string, spaces allowed), which is genuinely useful format guidance, but addr is only implied as "target memory" with no format, alignment, or address-space convention specified.

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 names a specific verb and resource ("Write raw bytes to target memory") and immediately differentiates itself from the sibling renef_mem_write by explaining that it handles mprotect internally and can reach read-only code pages. An agent can distinguish this from renef_mem_write without opening either schema.

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 gives an explicit selection condition: use this when the target is a read-only code page that renef_mem_write cannot touch. It does not state the inverse (prefer renef_mem_write for ordinary writable memory) or any prerequisites such as needing an attached process, so guidance is clear but not complete.

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