Skip to main content
Glama
renef-mcp
by Ahmeth4n

renef_spawn

Spawn an Android app and inject the Renef agent, using signal-based injection by default or an optional ptrace pause to freeze startup for early deferred hooks.

Instructions

Spawn an Android app and inject the Renef v0.4.0 agent (libagent.so).

Default injection (pause=False) is signal-based (NO ptrace, immune to TracerPid checks). With pause=True, uses the ptrace spawn gate to freeze the main thread before app code runs so deferred hooks on not-yet-loaded libraries catch the very first call.

Anti-debug note: pause=True sets TracerPid != 0 while paused. Prefer pause=False against targets suspected of anti-debug/ptrace checks unless early-hook timing is specifically needed.

Args: package_name: Android package name (e.g., "com.example.app") pause: Freeze the app at startup via ptrace spawn gate (default: False) hold: When pause=True, keep the app frozen across multiple exec/hook calls until renef_resume() is explicitly called (default: True) timeout: Spawn & injection timeout in seconds (default: 30.0)

Returns: JSON status with spawned PID and next-step guidance

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": {
      "package_name": "<package_name>"
    },
    "name": "renef_spawn"
  }
}

Input Schema

NameRequiredDescriptionDefault
holdNo
pauseNo
timeoutNo
package_nameYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.3/5.0
Behavior5/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 so: it discloses the injection mechanism (signal-based, no ptrace), the observable side effect of pause=True (TracerPid != 0, a detection risk), the freeze-until-resume semantics of hold, and the timeout. That is exactly the kind of side-effect and detection-surface information an agent needs before calling.

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?

The operation and default behavior are front-loaded in the first two sentences, then conditional behavior, a risk warning, and structured Args sections follow. Every sentence contributes: even the anti-debug note changes the recommended call pattern rather than restating the name.

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 4-parameter mutation-style tool with no annotations, this covers mechanism, defaults, side effects, and next steps, and an output schema exists so return details need not be expanded (the brief Returns line is a bonus). The one omission is spawn-versus-attach selection, which matters given a sibling named renef_attach.

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 documents all four parameters with meaning, defaults, and an example value for package_name. The hold documentation is conditional on pause and adds real semantics beyond the bare boolean. Minor gap: timeout interaction with pause/hold is not spelled out.

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?

States a concrete verb and resource plus the specific artifact injected ('Spawn an Android app and inject the Renef v0.4.0 agent (libagent.so)'), which is far beyond a tautology. It does not explicitly contrast spawn with the sibling renef_attach (already-running process) or renef_resume, leaving sibling differentiation to the tool name alone.

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?

Gives clear conditional guidance for its main branch: default pause=False is signal-based and safe against anti-debug targets, while pause=True should be used only when early-hook timing on not-yet-loaded libraries is needed. It also explains the hold flag's interaction with renef_resume. It stops short of routing between renef_spawn and renef_attach, so the alternative-selection guidance is incomplete.

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