Skip to main content
Glama

Cancel Session Job

session_cancel_job
Idempotent

Cancel a running background job in a durable cross-review session by providing the session ID and caller. Requires the original session petitioner's verified capability token; another peer cannot cancel the job.

Instructions

Request cancellation for running background jobs in a durable session. The reason accepts at most 300 characters. Requires the verified capability token of the persisted session petitioner; another peer cannot cancel the job. Provider calls receive AbortSignal where the provider client supports it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
callerYes
job_idNo
reasonNorequester_requested
session_idYes
response_formatNojson

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv4.4.18
    • removedInput schema / properties / caller / default
      Removed value: -"operator"
    • changedInput schema / properties / caller / enum
      Previous value: -[
      -  "codex",
      -  "claude",
      -  "gemini",
      -  "deepseek",
      -  "grok",
      -  "perplexity",
      -  "operator"
      -]New value: +[
      +  "codex",
      +  "claude",
      +  "gemini",
      +  "deepseek",
      +  "grok",
      +  "perplexity"
      +]
    • changedInput schema / required
      Previous value: -[
      -  "session_id"
      -]New value: +[
      +  "session_id",
      +  "caller"
      +]
  2. Changed1 schema field changedv4.4.9
    • changedInput schema / properties / reason / default
      Previous value: -"operator_requested"New value: +"requester_requested"
  3. First observedv4.4.8

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already indicate non-read-only, non-destructive, and idempotent behavior. The description adds meaningful behavioral detail: cancellation is a request, the reason is capped at 300 characters, only the original petitioner can cancel, and providers receive an AbortSignal when supported. 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences with no filler: the first states the purpose, the second covers constraints and authorization, and the third describes provider-side behavior. The structure is front-loaded and each sentence earns its place.

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?

With no output schema and zero parameter descriptions, the tool lacks critical context such as what a successful cancellation returns, how the optional job_id affects scope, and what errors may occur. The auth and AbortSignal details are useful, but an agent still cannot fully predict the outcome of an invocation.

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

Parameters1/5

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

Schema description coverage is 0%, so the description must carry the parameter-documentation burden, but it only restates the reason max length that is already in the schema. It does not explain session_id, job_id, caller, or response_format, and leaves the optional job_id behavior ambiguous. This provides almost no added meaning beyond the raw schema.

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 uses a specific verb ('cancel') and a specific resource ('running background jobs in a durable session'), making the tool's purpose immediately clear and distinguishable from siblings like session_poll or session_sweep. The phrase 'Request cancellation' is slightly indirect, but the intent is unambiguous.

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 gives clear usage context: it targets running background jobs in a durable session and explicitly states that another peer cannot cancel the job, which acts as a when-not for non-petitioners. It does not name an alternative tool, but the condition is strong enough for the common case.

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