Skip to main content
Glama

cancel

DestructiveIdempotent

Request a best-effort halt of an in-flight Cursor delegation by sessionId. The agent may finish anyway; the result indicates whether the request was acknowledged and the process state.

Instructions

Best-effort cancel of an in-flight delegation by sessionId. session/cancel is advisory — the agent may finish the turn anyway, and the delegate result then carries cancelRequested. Status: cancelled, killed (agent process observed to exit), not-running (turn already ended, still resumable), not-found (id not in this process's recent session history).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoKill the agent process if the turn is still running after a short grace period.
sessionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.5.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed1 schema field changedv2.0.0
    • changedInput schema / properties / force / description
      Previous value: -"After the cancel notify, wait a short grace period and kill the agent process if the delegation is still running"New value: +"Kill the agent process if the turn is still running after a short grace period."
  3. First observedv1.18.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the advisory nature of session/cancel (the agent may finish the turn anyway), what the delegate result then carries (cancelRequested), and the full meaning of each outcome status (cancelled/killed/not-running/not-found). This is exactly the rich behavioral context a destructive, idempotent cancel needs.

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?

Three tight sentences, front-loaded with purpose, then semantics, then outcomes. The status enumeration is compact and every clause carries information; nothing is padded.

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?

With no output schema, the description correctly carries the burden of explaining return statuses and the advisory/interruptible behavior of the operation, plus the force-kill outcome. For a 2-parameter destructive cancel tool this is complete enough to call correctly.

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 only 50% (sessionId is undocumented in the schema), but the description compensates by defining sessionId's domain ('this process's recent session history') via the not-found status, and by linking 'killed' to the force-kill behavior. This adds real meaning beyond the schema.

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 and resource ('Best-effort cancel of an in-flight delegation by sessionId'), which is inherently distinct from the 'delegate' and 'doctor' siblings. However, it never explicitly names or contrasts against those siblings, so it stops just short of full differentiation.

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?

Gives clear context for when this applies: cancelling an in-flight delegation, scoped to a session. It does not state exclusions or name alternatives (delegate/doctor), but the scenario is unambiguous enough that an agent knows when to reach for it.

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