Skip to main content
Glama

kilo_task_cancel

Stops a running background coding task immediately by sending SIGTERM, escalating to SIGKILL if needed. Use when a delegation is stuck, looping, off-spec, or wasting cost.

Instructions

STOP a running background kilo_implement task: this is the direct intervention lever, for when kilo_task_progress (or kilo_workspace_status) shows a delegation going wrong — off-spec changes, a stuck/looping process, burning cost with no progress — and you don't want to wait for the timeout.

Sends SIGTERM to the tracked process (and attempts an HTTP abort if connected to a running kilo serve instance), escalating to SIGKILL after a couple seconds if it hasn't exited. This is a hard stop — Kilo does not get a chance to write its Final Report. Any partial file changes it already made are left as-is; review with kilo_workspace_status and decide whether to keep, revert, or continue them with a fresh kilo_implement call using continue_session_id.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "task_id": "<task_id>"
    },
    "name": "kilo_task_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonNoWhy you're cancelling — recorded on the task so kilo_task_result explains what happened.
task_idYesThe task_id returned by kilo_implement when launched with background=true (the default).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the SIGTERM signal, the HTTP abort path for `kilo serve`, escalation to SIGKILL after a couple seconds, and that this is a hard stop with no Final Report. It also states the side effect that partial file changes are left as-is, which is the key risk an agent needs to know.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the imperative and the intervention framing, then escalating detail in a logical order (mechanism, consequence, recovery). It is somewhat long, but nearly every clause (escalation timing, Final Report loss, partial changes, continue_session_id) carries actionable information.

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?

An output schema exists, so return values need not be explained; the description instead covers the things the schema cannot: what gets killed, what is destroyed, and how to recover. Nothing needed to invoke this destructive operation safely is missing.

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 task_id and reason are already documented, including that reason is recorded for kilo_task_result. The description confirms the process being cancelled is the tracked background task but adds no format or sourcing detail beyond the schema; baseline 3 applies.

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?

Opens with a specific verb and resource: "STOP a running background kilo_implement task", and frames itself as "the direct intervention lever". It explicitly distinguishes itself from kilo_task_progress, kilo_workspace_status, and kilo_implement, so an agent can pick it without opening schemas.

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?

Gives concrete trigger conditions (off-spec changes, stuck/looping process, burning cost with no progress) and an exclusion ("don't want to wait for the timeout"). It also routes the follow-up work: review with kilo_workspace_status, then continue with a fresh kilo_implement call using continue_session_id.

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