Skip to main content
Glama

cancel

Stop a running turn by interrupting it when possible, then end the CLI session.

Instructions

Stop the running turn: interrupt if possible, then end the CLI.

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

Input Schema

NameRequiredDescriptionDefault
root_handleNo
task_handleNo
session_handleNo
workspace_pathNoRepo path; omit for client workspace.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.8.0
    • addedInput schema / properties / root_handle
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / task_handle
      Added value: +{
      +  "type": "string"
      +}
    • changedInput schema / properties / workspace_path / description
      Previous value: -"Repository path; omit for client workspace (footer fallback)."New value: +"Repo path; omit for client workspace."
    • removedInput schema / required
      Removed value: -[
      -  "session_handle"
      -]
  2. First observedv0.7.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It usefully discloses the fallback sequence 'interrupt if possible, then end the CLI', but omits permissions, irreversibility or data-loss implications, effects on the supplied handles, and response behavior.

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?

One front-loaded sentence with no filler; the colon cleanly separates the action from the fallback behavior. It is appropriately concise.

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

Completeness2/5

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

For a four-parameter cancel operation with no annotations and no output schema, the description is too thin: it omits parameter roles, alternative-tool guidance, and consequences of ending the CLI. It covers only the core stop behavior.

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

Parameters2/5

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

Schema description coverage is only 25%: workspace_path is documented, while root_handle, task_handle, and session_handle are undescribed. The description adds no meaning for any parameter, so it fails to compensate for the low coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Stop') and resource ('running turn'), plus the two-step behavior 'interrupt if possible, then end the CLI'. It is clear what the tool does, though it does not differentiate itself from siblings such as session or delegate.

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

Usage Guidelines3/5

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

The action implies it should be used when a running turn needs to be stopped, but there is no explicit when-to-use guidance, no when-not-to-use exclusions, and no mention of alternatives. The guidance is only implied.

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

Deploy Server

Other Tools