Skip to main content
Glama

cancel_sale

Idempotent

Cancel a sale order to reverse the transaction and automatically restore ordered item quantities back into physical store inventory.

Instructions

Cancel a sale order and automatically restore the ordered item quantities back into the physical store inventory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSale order UUID to cancel (required).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoResult data payload from Chirak API.
successNoStatus of the tool execution.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish that this is a write operation and is idempotent. The description adds valuable context about the concrete effect (inventory restoration) beyond what annotations provide. No contradictions found.

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?

A single, front-loaded sentence that conveys the primary action and its key side effect without any filler or redundancy.

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 one-parameter cancel operation with an existing output schema and annotations covering idempotency, the description is complete enough. It could mention cancellation prerequisites or failure states, but nothing essential is missing.

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?

The single parameter 'id' is fully described in the schema as the sale order UUID to cancel (100% coverage). The description adds no further parameter details, so the baseline of 3 is appropriate.

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 action (cancel), the resource (a sale order), and a distinctive side effect (restoring ordered quantities to inventory). This differentiates it from related tools like record_sale or adjust_stock, even without naming them explicitly.

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 context: canceling a sale order also restores inventory automatically, which implies its use case. However, it does not explicitly discuss when to prefer it over alternatives or mention invalid conditions (e.g., cannot cancel already-canceled sale).

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