Skip to main content
Glama

kill_process

Terminate running processes by process ID using the Frida MCP server. This tool stops specified processes on mobile or desktop devices for debugging, testing, or security analysis purposes.

Instructions

Kill a process by ID.

Returns: Status information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_idNoOptional ID of the device where the process is running. Uses smart selection when omitted.
pidYesThe ID of the process to kill.

Implementation Reference

  • The kill_process tool handler function. It resolves the target device using _resolve_device_or_raise, then calls the Frida device's kill method on the specified PID. Includes input schema via Pydantic Field decorators and error handling.
    @mcp.tool() def kill_process( pid: int = Field(description="The ID of the process to kill."), device_id: Optional[str] = Field( default=None, description="Optional ID of the device where the process is running. Uses smart selection when omitted.", ), ) -> Dict[str, Any]: """Kill a process by ID. Returns: Status information """ try: device = _resolve_device_or_raise(device_id) device.kill(pid) return {"success": True, "pid": pid} except Exception as e: raise ValueError(f"Failed to kill process {pid}: {str(e)}")

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

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