Skip to main content
Glama

process_cleanup

Dry-run inspect and plan cleanup of leftover subprocesses from AI coding agents. Real termination requires explicit confirm token and is only available with trusted config.

Instructions

Dry-run selected owned_current_session candidates. In v0.7.x public CLI/MCP, real termination remains non-operable because evidence inputs are not exposed; dry_run=false stays blocked by safety gates. Agents must not call dry_run=false autonomously.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoDefaults to true. When true, kills nothing. A live confirm token is not returned unless real cleanup is enabled by trusted config or request_confirm_token=true is explicit.
confirm_tokenNoToken returned by a previous dry-run cleanup plan.
request_confirm_tokenNoExplicitly request a live confirm token during dry-run. Agents should leave this false unless a human asks for manual cleanup.
scopeNo
pidsNo
min_age_minutesNo
signalNo
forceNoAfter SIGTERM, optionally escalate to SIGKILL if still alive.
include_process_treeNoReserved; ignored unless tree-kill is enabled in config.
include_command_lineNo
Behavior4/5

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

With no annotations, the description carries full burden. It discloses that dry_run=true is the intended mode, that real cleanup is disabled (dry_run=false blocked), and includes safety gate context. It does not discuss return values or error states, but the core behavioral trait (dry-run) is transparent.

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?

Two sentences, no redundancy. The first sentence front-loads the primary purpose, and the second delivers critical usage constraints. Every word earns its place.

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 10-parameter tool with no output schema and no annotations, the description covers the essential behavioral constraint (dry-run only) but omits return format and error handling. Adequate but not complete.

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 50% (5/10 parameters described). The description does not add parameter-level guidance beyond what's in the schema, missing opportunities to explain usage nuances for parameters like confirm_token or scope. Baseline of 3 is appropriate.

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?

The description clearly states the tool performs a dry-run on owned_current_session candidates, using a specific verb ('Dry-run') and resource. It distinguishes from siblings like auto_cleanup_dryrun by specifying the scope 'owned_current_session'.

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?

Provides explicit guidance that agents must not call dry_run=false autonomously and explains that real termination is non-operable due to blocked safety gates. However, it lacks comparison to sibling cleanup tools for alternative selection.

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/MarceloCaporale/clean-process-ended'

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