Skip to main content
Glama

Cancel request

cancel_request
DestructiveIdempotent

Cancel an unpaid request before payment starts. Pass expected_revision as an integer from the latest get_request. Only expected_revision is sent in the HTTP body; do not add sample_id or requisition fields. On revision_conflict, retry once with error.revision (error.next_action is cancel) and do not repeat the old revision. On invalid_input, fix error.invalid and error.missing, then retry once with error.revision. Paid orders require support.

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": {
      "request_id": "<request_id>",
      "request_capability": "<request_capability>",
      "expected_revision": "<expected_revision>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "cancel_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
request_idYes
idempotency_keyYes
expected_revisionYesRequired integer. Current request revision, or error.revision from a cancel revision_conflict / invalid_input. Do not send a string.
request_capabilityYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / expected_revision / description
      Added value: +"Required integer. Current request revision, or error.revision from a cancel revision_conflict / invalid_input. Do not send a string."
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, and the description adds genuinely new operational behavior: retry policy for revision_conflict and invalid_input, the one-retry ceiling, and the prohibition on repeating a stale revision. It also discloses a payload constraint (only expected_revision in the HTTP body) that the schema cannot express. It does not say what the success response looks like or whether cancellation is reversible, which keeps it from a 5.

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?

The precondition and revision requirement are front-loaded, and each subsequent sentence covers a distinct failure path (conflict, invalid input, paid order) with no filler. The retry sentences are dense and clause-heavy, but nothing is redundant.

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?

For a destructive, four-required-parameter mutation with no output schema, the description covers the precondition, the revision-sourcing requirement, both documented error branches with remediation, and the escalation path for paid orders. Remaining gaps (success response shape, what state the request lands in, auth expectations) are modest but real.

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 only 25%, and the description's expected_revision guidance largely restates the schema field description rather than extending it. It does clarify that request_id, request_capability, and idempotency_key must not be duplicated into the body (implying they belong in path/headers), but request_capability and idempotency_key are never explained anywhere.

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 first sentence names a specific verb (cancel) and resource (an unpaid request) and adds a scope constraint ('before payment starts') that an agent can act on immediately. It does not explicitly distinguish itself from the sibling cancel_collection, but the resource boundary is clear enough to separate them.

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?

It states the use case (unpaid request, before payment), the exclusion ('Paid orders require support'), and routes the agent to get_request to obtain expected_revision. It stops short of naming alternatives such as cancel_collection, so the agent must infer the choice from the resource wording.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources