Skip to main content
Glama
renef-mcp
by Ahmeth4n

renef_mem_manage

Allocate, free, or change page permissions in target process memory for Android ARM64 instrumentation and reverse engineering.

Instructions

Allocate, free, or change page permissions in target process memory (Renef v0.4.0 API).

Actions:

  • alloc: Allocate size bytes with permissions prot (e.g., "rw-", "rwx", "r-x") -> Memory.alloc

  • alloc_str: Allocate a NUL-terminated copy of text in target memory -> Memory.allocStr

  • free: Free memory allocated at address (optional size) -> Memory.free

  • protect: Change memory protection of [address, address+size) to prot -> Memory.protect

Args: action: "alloc", "alloc_str", "free", or "protect" address: Memory address (required for "free" and "protect") size: Byte size (required for "alloc" and "protect"; optional for "free") text: String content (required for "alloc_str") prot: Permission string like "rw-", "r-x", "rwx" (default: "rw-")

Returns: JSON object with result address or confirmation

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": {
      "action": "<action>"
    },
    "name": "renef_mem_manage"
  }
}

Input Schema

NameRequiredDescriptionDefault
protNorw-
sizeNo
textNo
actionYes
addressNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden; it usefully discloses the default protection ('rw-'), the NUL-termination behavior of alloc_str, and the half-open range semantics of protect. It says nothing about required privileges, the risk of requesting 'rwx', whether free tolerates a mismatched size, or error/rollback behavior on a bad address, which matters for a mutation tool with zero annotation coverage.

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?

Front-loaded one-line summary followed by scannable Actions/Args/Returns sections; every bullet adds information an agent needs to dispatch on action. No redundant restatement of the tool name or filler prose.

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?

Given four operations and five loosely typed parameters, the description covers what an agent must know to pick the action and supply arguments, and an output schema exists so return values need no elaboration here. Minor gaps are the address encoding, failure modes, and the schema-default versus required-parameter tension, which the description does not reconcile.

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 coverage is 0%, so the description must compensate and largely does: it enumerates the four valid action values, gives example protection strings, states the default, and ties each parameter to the actions that require it. It omits the address format (hex string?) and does not flag the conflict between the schema defaults (size 0, address empty) and the stated per-action requirements.

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 specific verbs (allocate, free, change page permissions) and the exact resource (target process memory), then enumerates the four concrete actions mapped to underlying Memory.* calls. An agent can distinguish this from siblings like renef_mem_read, renef_mem_write, and renef_mem_dump purely from the description.

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?

Per-action breakdown makes clear which parameters each action needs (address for free/protect, size for alloc/protect, text for alloc_str), which is real invocation guidance. It stops short of stating when to choose alloc vs alloc_str or when a protect call is warranted, and names no alternatives, so no explicit when-not guidance.

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