Skip to main content
Glama

spawn_and_inject

Automatically kill, relaunch, and inject Frida code into an Android app at startup to hook early lifecycle methods.

Instructions

Kill app, relaunch, connect, and inject script in one step. Use this when you need to hook early initialization (e.g. onCreate, static initializers). Equivalent to: kill_app -> launch_app -> connect -> execute.

Args: package: The app package name (e.g. com.taobao.taobao). script: Frida JavaScript code to inject at startup. Use send() to return data. script_file: Path to a .js file to inject. Use this for large scripts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packageYes
scriptNo
script_fileNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries full transparency burden. It clearly discloses the destructive behavior ('Kill app'), the sequence of actions, and the injection point ('at startup'). It could improve by mentioning potential failure modes or prerequisites, but it effectively communicates the main behavioral traits.

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 description is concise and well-structured: three sentences plus a bulleted argument list. It front-loads the main purpose, then provides usage guidance and argument details without extraneous information. Every sentence adds value.

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 composite tool with an output schema, the description explains what it does, when to use it, and the arguments. It is complete enough for typical use cases, but could mention prerequisites (e.g., device connected) or note that the output schema describes the result. Overall, it's quite comprehensive.

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%, so the description must fully compensate. It provides clear, actionable descriptions for all three parameters: 'package' is the app package name, 'script' is Frida JS code with guidance on using send(), and 'script_file' is a path for large scripts. This adds significant meaning beyond the bare schema.

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's purpose: 'Kill app, relaunch, connect, and inject script in one step.' It uses a specific verb and resource (a multi-step process for app injection) and implicitly distinguishes it from sibling tools by noting it's equivalent to chaining kill_app, launch_app, connect, and execute.

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 explicitly states when to use the tool: 'Use this when you need to hook early initialization (e.g. onCreate, static initializers).' It also implies when not to use it by labeling it as a composite of individual tools, suggesting those are alternatives for different needs. However, it could be more explicit about exclusion cases.

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

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