kill_process
Terminate a process by PID to stop unresponsive or unwanted programs. Confirm PID with user; force flag sends SIGKILL for immediate termination.
Instructions
Terminate a process by its PID. This is a DESTRUCTIVE operation.
Use this only after identifying the target process with find_process or get_top_processes. Always confirm the PID and process name with the user before calling this tool. Killing system processes may cause instability.
Side effects: sends a signal to the target process.
Default (force=False): sends SIGTERM, allowing the process to clean up gracefully.
force=True: sends SIGKILL, immediately terminating the process without cleanup. May require elevated privileges (sudo) for processes owned by other users.
Returns a confirmation message with the process name, or an error message if the process does not exist or access is denied.
Args: pid: The numeric process ID to terminate. Use find_process or get_top_processes to discover valid PIDs. force: If False (default), send SIGTERM for graceful shutdown. If True, send SIGKILL for immediate termination — use only when SIGTERM fails or the process is unresponsive.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes | ||
| force | No |