Skip to main content
Glama

cancel

DestructiveIdempotent

Stop an active delegation by session ID, optionally force-killing the agent process if it continues after a grace period, returning its final status.

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
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the description's job is to add context beyond that. It does: it discloses the advisory/non-guaranteed nature, notes that a delegate result may still carry cancelRequested, and enumerates the full status space (cancelled, killed, not-running, not-found) including what killed means. No contradiction with the annotations.

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?

One focused paragraph that front-loads purpose before the caveat and status enumeration. Every clause carries information — the advisory note, the cancelRequested side effect, and four distinct statuses. It is slightly dense, but nothing is filler.

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?

Despite having no output schema, the description effectively documents return semantics by enumerating the four possible statuses and what each means. For a 2-parameter mutating tool, the behavioral guarantees, edge cases (not-running, not-found), and the force parameter are all covered. A minor gap is the lack of guidance on how long the 'short grace period' is for force.

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%: 'force' is well-documented in the schema but 'sessionId' has no description there. The description compensates by naming sessionId as the identifier of the in-flight delegation, giving it purpose. It does not add formatting or provenance detail, but for a string id this is adequate.

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 specific verb-resource pair — 'Best-effort cancel of an in-flight delegation by sessionId' — that names the operation, the target, and the key handle. It also distinguishes itself implicitly from the sibling 'delegate' (which creates the delegation that this tool cancels), so an agent can separate the two 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 Guidelines4/5

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

The description conveys when to use it (to cancel an in-flight delegation) and sets expectations up front with 'best-effort' and 'advisory'. The status list tells the caller what outcomes to anticipate. It does not explicitly name when-not-to-use or recommend an alternative, but against the sibling set (delegate creates, doctor diagnoses) the boundary is clear enough.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andreilungeanu/cursor-delegate-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server