Skip to main content
Glama
cbxss
by cbxss

list_hooks

Display all installed persistent hooks with their names and indices to review active Frida hooks during Android security testing.

Instructions

List all installed persistent hooks with their names and indices

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual implementation of list_hooks: retrieves the current Frida session and returns a list of all installed persistent hooks with their names and indices.
    def list_hooks() -> list[dict]:
        """List all installed persistent hooks."""
        fs = get_session()
        return [{"name": h["name"], "index": i} for i, h in enumerate(fs.persistent_scripts)]
  • The MCP Tool definition registering 'list_hooks' with description and empty input schema.
    Tool(
        name="list_hooks",
        description="List all installed persistent hooks with their names and indices",
        inputSchema={"type": "object", "properties": {}, "required": []},
    ),
  • The call_tool dispatcher that routes 'list_hooks' to hooks.list_hooks().
    elif name == "list_hooks":
        return hooks.list_hooks()
  • list_hooks calls get_session() to obtain the current FridaSession (from session module) and reads fs.persistent_scripts to build the result list.
    def list_hooks() -> list[dict]:
        """List all installed persistent hooks."""
        fs = get_session()
        return [{"name": h["name"], "index": i} for i, h in enumerate(fs.persistent_scripts)]
  • Input schema for list_hooks: empty object with no required properties (takes no arguments).
        inputSchema={"type": "object", "properties": {}, "required": []},
    ),
Behavior2/5

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

With no annotations, the description carries full burden. It implies read-only behavior via 'list' but does not explicitly state it's non-destructive or safe, nor discuss any side effects.

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?

A single, front-loaded sentence with no extraneous words. Every part of the description is necessary and informative.

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?

The description covers the tool's purpose and hints at output (names and indices) but lacks full detail on the return structure, which is acceptable given no output schema.

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?

No parameters exist, so the description adds no parameter detail. Baseline score of 4 is appropriate as schema coverage is 100% and no extra explanation is needed.

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 clearly states the tool lists all installed persistent hooks with names and indices. It uses a specific verb ('list') and resource, distinguishing it from sibling tools like install_hook or android_hook_method.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. It does not mention exclusion cases or prerequisites, such as needing an active session or installed hooks.

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/cbxss/frida-mcp'

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