Skip to main content
Glama

Cancel a claim

cancel_claim
Destructive

Cancel a delivery claim, including accepted ones. Check cancellation terms first, then pass the cancel_state to apply a free or paid fee.

Instructions

Cancels a claim (including an already accepted one). Get the terms with get_cancel_info first and pass its cancel_state: with paid the cancellation fee is charged. version comes from get_claim. 409 errors: old_version, inappropriate_status, free_cancel_is_unavailable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
versionYesClaim version from the latest get_claim response.
claim_idYesClaim id (claim_id, 32–64 characters) from the create_claim or search_claims response.
cancel_stateYesCancellation mode from get_cancel_info: free — no charge, paid — a fee applies.
Behavior5/5

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

The description discloses that cancelling an accepted claim is possible, that a paid cancellation incurs a fee, and lists specific 409 error conditions (old_version, inappropriate_status, free_cancel_is_unavailable). This adds behavioral context beyond the readOnlyHint/destructiveHint annotations, which already signal mutation and destructiveness. No contradiction exists.

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?

The description is compact and front-loaded with the core action. It packs essential instructions and error information into a few sentences without extraneous content, making it easy to parse.

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?

Given the tool's complexity (state-dependent cancellation, fees, versioning), the description covers all necessary context: prerequisites, parameter sources, fee implications, and likely errors. There is no output schema, but the description sufficiently informs the agent about expected behavior and failure modes.

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

Parameters5/5

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

Though the schema already covers all parameters, the description enriches semantics by telling where each parameter comes from: cancel_state from get_cancel_info, version from get_claim, and claim_id from create_claim/search_claims. It also explains the free vs. paid meaning, adding clarity beyond the schema's enum descriptions.

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 clearly states the tool's function: 'Cancels a claim (including an already accepted one).' This uses a specific verb and resource, and explicitly notes that even accepted claims can be cancelled, which distinguishes it from sibling tools like accept_claim or get_cancel_info.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The description provides explicit usage guidance: it tells the caller to first get terms with get_cancel_info and pass its cancel_state, and that version comes from get_claim. This effectively defines a workflow and prerequisites, which is exactly what an agent needs to use the tool correctly.

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/A1-x-Tech/mcp-yango-delivery'

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