Skip to main content
Glama
WhiteNightShadow

camoufox-reverse-mcp

hook_function

Hook JavaScript functions to intercept or trace execution, enabling dynamic analysis and reverse engineering.

Instructions

Hook or trace a function (v0.9.0 unified).

Replaces hook_function + trace_function.

Args: function_path: Full path like "window.encrypt", "XMLHttpRequest.prototype.open", "JSON.stringify". mode: "intercept" — inject custom JS before/after/replace the function. Requires hook_code. (was: hook_function) "trace" — non-invasive trace logging args, return values, and optionally call stacks. (was: trace_function) hook_code: JS code for "intercept" mode. Context vars: - arguments: original args - __this: the 'this' context - __result: return value (only in position="after") position: For "intercept": "before", "after", or "replace". non_overridable: For "intercept": use Object.defineProperty to lock. persistent: If True, survives page navigation. log_args: For "trace": record arguments (default True). log_return: For "trace": record return values (default True). log_stack: For "trace": record call stacks (default False). max_captures: For "trace": max calls to record (default 50).

Returns: dict with status, target, mode.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
function_pathYes
modeNointercept
hook_codeNo
positionNobefore
non_overridableNo
persistentNo
log_argsNo
log_returnNo
log_stackNo
max_capturesNo
Behavior4/5

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

With no annotations, the description handles behavioral disclosure well. It details that intercept mode injects custom JS with context variables, trace mode logs non-invasively, and mentions persistence and non-overridability. It could mention potential resource usage or removal mechanisms, but overall it is transparent.

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?

The description is well-structured with a one-liner and bulleted arguments. While informative, it is somewhat verbose; for example, the context variable explanations could be condensed. Still, it remains clear and readable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 10 parameters, no output schema, and no annotations, the description is remarkably complete. It explains every parameter, the return value format, and gives usage patterns like examples for function_path. It covers both modes thoroughly.

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 description coverage is 0%, but the description provides extensive parameter semantics beyond the schema: explains function_path format, mode options, hook_code context variables, position values, and trace-related parameters. This adds significant meaning that the schema lacks.

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 starts with 'Hook or trace a function (v0.9.0 unified).' It clearly states the tool's purpose and distinguishes it as a unified replacement for older hook and trace functions. Sibling tools like hook_jsvmp_interpreter and trace_property_access are different, so this description effectively differentiates.

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 description explains two modes ('intercept' and 'trace') with their requirements and behavior, e.g., 'Requires hook_code' for intercept. It provides context for when each mode is appropriate. However, it does not explicitly compare with siblings like hook_jsvmp_interpreter or trace_property_access, which would improve guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/WhiteNightShadow/camoufox-reverse-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server