Skip to main content
Glama
renef-mcp
by Ahmeth4n

renef_hook_generate

Generate a Renef Lua hook template for a library offset or symbol using the server's hookgen command. Specify a library and offset/symbol, or search symbols across loaded libraries.

Instructions

Generate a Renef Lua hook template using the server's hookgen command.

Examples:

  • renef_hook_generate("libnative.so", "0x1234") — template for offset

  • renef_hook_generate("libc.so", "malloc") — template for symbol in library

  • renef_hook_generate("malloc") — search symbol across loaded libraries

Args: lib_name: Library name, or symbol name if offset_or_symbol is omitted offset_or_symbol: Optional hex offset or symbol name inside lib_name

Returns: Generated Lua hook template

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "renef_hook_generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
lib_nameNo
offset_or_symbolNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It discloses the underlying mechanism ('hookgen' command) and that the result is a template rather than an installed hook, which usefully signals this is a non-mutating generation step. It does not say whether generation requires an attached target or loaded libraries, nor whether anything is written to disk, which are real gaps for an unannotated tool.

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?

Purpose is front-loaded in one sentence, followed by compact examples and a short Args/Returns block — no filler. The three examples are slightly repetitive in structure but each demonstrates a genuinely different call mode, so they earn their space.

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?

With only two optional parameters and an output schema present, the description covers the essential unknown (the dual role of the arguments) and notes that a Lua template comes back. The only meaningful omission is the operational precondition for generating a hook template, such as needing an attached process, which the description leaves implicit.

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

Parameters5/5

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

Schema coverage is 0% and both properties are bare optional strings with empty defaults, so the description must supply all meaning. The Args block explains that `lib_name` becomes the symbol name when `offset_or_symbol` is omitted, a conditional role that is impossible to derive from the schema, and the examples demonstrate the resulting call shapes concretely.

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 specific verb and artifact: 'Generate a Renef Lua hook template using the server's `hookgen` command,' which distinguishes it from the sibling renef_hook_java/renef_hook_native tools that install hooks rather than emit templates. It never explicitly says it differs from those siblings, so differentiation is inferable rather than stated.

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?

The three examples function as explicit usage modes: two-arg call for a specific offset or symbol, and a one-arg call for cross-library symbol search. That tells an agent which argument form to pick, but there is no guidance on when to choose this generator over the sibling hook-installation tools, nor any stated prerequisite (e.g. attached process).

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