Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
pidYes
forceNo
Behavior5/5

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

No annotations provided, but description fully discloses destructive nature, signal types (SIGTERM vs SIGKILL), permission requirements, side effects, and return types (confirmation or error). Detailed parameter behavior for force.

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?

Well-structured with clear sections: purpose, usage guidelines, side effects, parameter details. Each sentence is informative without redundancy. Front-loaded with core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Coverage for all aspects: input (pid, force), behavior (signal types), prerequisites (identification), warnings, permissions, return values. No output schema, but description includes expected confirmation/error messages.

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 has 0% description coverage; description compensates fully by explaining pid (numeric, use discovery tools) and force (default false sends SIGTERM, true sends SIGKILL, when to use each). Adds guidance not present in 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?

Description clearly states 'Terminate a process by its PID' with a specific verb and resource. Distinguishes from sibling tools like find_process and get_top_processes by indicating the action is termination, not discovery.

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

Usage Guidelines5/5

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

Explicitly states when to use (after identification via find_process/get_top_processes) and provides critical safety instructions (confirm with user, danger of killing system processes). Mentions alternatives for identification.

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/dragogargo/mcp-sysmon'

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