Skip to main content
Glama
Kiro MCP Server

Kiro MCP Server

Cancel a Kiro turn or headless job

kiro_cancel
Idempotent

Cancel a session's running turn to reject pending permissions, drop queued prompts, and optionally stop a headless job; the session remains open.

Instructions

Cancel a session's running turn (like Ctrl+C): pending permissions are answered with the offered reject option, session/cancel is sent, and the call waits up to 30 s for Kiro's prompt response before returning the settled turn. Queued prompts are dropped. With job_id, stops a headless run's process group (SIGTERM, then SIGKILL 5 s later). The session stays open.

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": "kiro_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idNo
session_idNoKiro session id (sess_<uuid>).

Output Schema

NameRequiredDescriptionDefault
jobYes
turnYes
job_idYes
statusYes
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: pending permissions are auto-answered with the reject option, session/cancel is emitted, the call blocks up to 30 s awaiting the prompt response, queued prompts are dropped, and the headless path escalates SIGTERM to SIGKILL after 5 s. This is exactly the side-effect detail an agent needs before firing a cancel, and it does not conflict with destructiveHint=false or idempotentHint=true.

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?

Dense and front-loaded: primary behavior first, headless variant second, persistence caveat last. Nearly every clause carries new information (reject option, 30 s timeout, SIGTERM/SIGKILL timing), though the job_id sentence is packed enough that the mode switch could be flagged more prominently.

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?

For a cancel tool with an output schema, this covers the blocking behavior, the return value ("the settled turn"), the permission side effect, the headless kill sequence, and the post-cancel session state. Nothing an agent needs to call it safely is missing.

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

Parameters4/5

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

Schema coverage is 50% (only session_id documented), and the description compensates by explaining what each mode does: session_id targets a running turn, job_id targets a headless run's process group. It stops short of saying whether the parameters are mutually exclusive or what the default is when both are omitted, which the optional-parameter schema leaves ambiguous.

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+resource ("Cancel a session's running turn") plus an everyday analogy (Ctrl+C), then names the second mode (headless job via job_id). The closing line "The session stays open" implicitly separates it from kiro_session_close and kiro_session_delete, so an agent can distinguish it from siblings without opening a 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?

Clearly states the two usage modes: no job_id cancels a running turn, with job_id stops a headless run. The "session stays open" note signals this is not the tool for tearing down a session, though it never explicitly names kiro_session_close as the alternative nor states what happens if neither parameter is supplied (both are optional).

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