Skip to main content
Glama

process_cleanup

Find and kill stale hanging or orphaned cmd.exe and conhost.exe processes older than a set age; optionally list them first or include orphaned node.exe processes.

Instructions

Find and kill hanging/orphaned cmd.exe and conhost.exe processes. Targets windowless CMD processes older than the specified age (default: 30 seconds). Use this to clean up stale processes left by Antigravity's run_command tool.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "process_cleanup"
  }
}

Input Schema

NameRequiredDescriptionDefault
dryRunNoIf true, only list processes without killing them. Defaults to false.
includeNodeNoAlso clean up orphaned node.exe processes. Defaults to false.
maxAgeSecondsNoKill processes older than this many seconds. Defaults to 30.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full safety burden and does disclose the important part: which processes are destroyed (windowless cmd.exe/conhost.exe past an age threshold). It omits permissions requirements, what happens when a kill fails, and whether the caller's own child processes are excluded from the sweep.

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?

Three tight sentences with the action and target front-loaded, then selection criteria, then the motivating use case. No redundant wording.

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

Completeness3/5

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

For a destructive cleanup tool with no annotations and no output schema, the definition covers targeting but not results: it never says whether it returns killed process IDs, a count, or diagnostics, and dryRun's output shape is likewise unspecified. Adequate but with a real gap around return behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all three parameters are already documented in the schema. The description reinforces the age threshold and its 30-second default but adds no meaning beyond that; baseline 3 is appropriate when the schema does the work.

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?

States a specific verb pair ('Find and kill') and concrete resources ('cmd.exe and conhost.exe'), plus a precise target scope ('windowless CMD processes older than the specified age'). An agent can distinguish this from process_list or cmd_run without inspecting any schema.

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?

Explicitly names the triggering scenario: cleaning up stale processes left by Antigravity's run_command tool. It does not name a non-destructive alternative (e.g., process_list) or state when not to use it, so it falls short of full when/when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.