Skip to main content
Glama

renef_hook_generate

Generate a ready-to-run Lua hook template for a library and symbol or offset, resolving symbol offsets through an active session so you can hook native methods without writing boilerplate.

Instructions

Generate a ready-to-run Lua hook template (upstream hookgen command). With a symbol it resolves the offset first (needs a session): renef_hook_generate("libc.so", "fopen") or renef_hook_generate("libc.so", "0x1a2b3").

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": {
      "lib": "<lib>"
    },
    "name": "renef_hook_generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
libYes
symbol_or_offsetNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.4/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 behavioral burden. It usefully discloses the session dependency for symbol resolution and that the output is a template rather than an installed hook, but it does not state whether anything is written to disk, what failures look like if the symbol is unresolved, or whether a session is needed for the offset form.

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 sentences, front-loaded with the action, then the branch condition and illustrative calls. Minimal waste; the only soft spot is that the parenthetical about `hookgen` and the session note are compressed into one clause, making the precondition slightly easy to miss.

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 format need not be explained. For a two-parameter generator the description covers the main path, but it leaves the no-symbol case and the scope of `lib` (bare module name vs path) undefined, which an agent would need in order to call it reliably.

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. The paired examples clarify that the second parameter accepts either a symbol name or a hex offset, which is real added meaning, but the empty-default behavior of symbol_or_offset (template with placeholder?) and the format expectations for `lib` are unaddressed.

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?

The description states a specific verb+resource: generating a ready-to-run Lua hook template via the upstream `hookgen` command. That distinguishes it from siblings that actually install hooks or load scripts, though it never names those siblings to make the boundary explicit.

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?

It gives a concrete precondition (a symbol requires an active session because the offset is resolved first) and shows two valid call shapes. It does not say when to prefer this over renef_hook_native, renef_hook_java, or renef_load_script, so the choice between tools remains implied.

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