Skip to main content
Glama

cancel

DestructiveIdempotent

Stop an in-flight Cursor turn by sessionId, optionally force-killing the process after a grace period, and report whether it stopped, was killed, ended, or was not found.

Instructions

Cancel an in-flight Cursor turn by sessionId. Status is cancelled, killed, not-running (the turn ended and the session can still be resumed), or not-found.

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": {
      "sessionId": "<sessionId>"
    },
    "name": "cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoAfter a short grace period, kill the Cursor process if the turn is still running.
sessionIdYesSession id returned by delegate.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is covered. The description meaningfully adds beyond that by disclosing the four terminal states and the important nuance that 'not-running' leaves the session resumable, which tells the agent the cancel may be a no-op. It stops short of saying what happens to partial turn output or whether cancellation is reversible.

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, zero filler: the action and its scoping parameter come first, and the outcome states follow as a compact enumeration. Nothing repeats the annotations or the schema.

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

Completeness4/5

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

With no output schema, the description helpfully supplies the return statuses that an agent needs to interpret results, and annotations cover the destructive/idempotent profile for this low-parameter, low-complexity tool. It is nearly complete; only the interaction between 'force' and the grace period outcome is left to the schema.

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%, including a description for 'force' explaining the grace period and process kill. The description only references sessionId implicitly through 'by sessionId' and adds no format, provenance, or error semantics beyond the schema, so the 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?

The description opens with a precise verb+resource pair ('Cancel an in-flight Cursor turn by sessionId') and then enumerates the possible outcomes (cancelled, killed, not-running, not-found), which makes its role unmistakable next to 'delegate' (which starts a turn) and 'doctor' (diagnostics). An agent can select this tool without opening the schema.

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?

Usage is implied by 'in-flight Cursor turn' and by the status enumeration, notably that 'not-running' means the turn already ended and the session is still resumable. There is no explicit when-to-use vs. sibling guidance, no prerequisite statement (e.g., must have a sessionId from delegate), and no mention of when to prefer resuming over cancelling.

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