Skip to main content
Glama
dofunc
by dofunc

cancel

Stop the active turn for a specified session and return status until the agent confirms or is idle.

Instructions

Cancel the current turn. Returns "cancelling" until the agent confirms, or "done" when already idle.

Input Schema

NameRequiredDescriptionDefault
sessionYesSession id returned by open

Output Schema

NameRequiredDescriptionDefault
statusYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.6/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 does disclose the return-state semantics ('cancelling' until the agent confirms, 'done' when already idle), which signals partial idempotence in the already-idle case. It says nothing about whether in-flight work is discarded, whether the call blocks, or what permissions are needed.

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 tightly written sentences: the operation and its scope come first, and the return-state detail follows. Nothing is padded or repeated.

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 an output schema present and the sole parameter fully documented, this is close to complete; the description's return-value explanation is a small redundancy rather than a gap. What remains unstated, chiefly what cancel does to in-flight work and how it differs from close or reject, is minor for a one-parameter tool.

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% and the single 'session' parameter is documented in the schema as the id returned by open. The description adds no meaning beyond that, so the baseline of 3 applies.

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?

The description uses a specific verb plus a scoped resource ('cancel the current turn'), which is far clearer than a bare 'cancel'. However, it doesn't distinguish itself from similarly named siblings such as reject or close, leaving the agent to infer the boundary.

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 current turn' implies usage context: you call it mid-turn, not against a whole session. That said, there is no explicit guidance on when to choose cancel over reject, close, or delete, so the selection logic remains inferential.

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