get_process_by_name
Locate running processes on mobile or desktop devices by specifying a process name or partial name for dynamic instrumentation and analysis.
Instructions
Find a process by name.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name (or part of the name) of the process to find. Case-insensitive. | |
| device_id | No | Optional ID of the device to search the process on. Uses smart selection when omitted. |
Implementation Reference
- src/frida_mcp/cli.py:323-339 (handler)The core handler function for the 'get_process_by_name' tool, decorated with @mcp.tool() for automatic registration in FastMCP. It resolves the device, enumerates processes, and searches for a matching process name (case-insensitive partial match). Returns process details if found, or an error message.@mcp.tool() def get_process_by_name( name: str = Field( description="The name (or part of the name) of the process to find. Case-insensitive." ), device_id: Optional[str] = Field( default=None, description="Optional ID of the device to search the process on. Uses smart selection when omitted.", ), ) -> dict: """Find a process by name.""" device = _resolve_device_or_raise(device_id) for proc in device.enumerate_processes(): if name.lower() in proc.name.lower(): return {"pid": proc.pid, "name": proc.name, "found": True} return {"found": False, "error": f"Process '{name}' not found"}