Skip to main content
Glama

cancel_order

Cancel an Ozon order entirely or by specific SKUs, returning items to the cart. Verifies selections against Ozon to prevent cancelling the wrong line.

Instructions

[GATED by writes_enabled] Cancel an order, by default returning its items to the cart. skus cancels only those lines and leaves the rest of the order standing — an order can be cancelled item by item, in as many passes as it has items. Omit it to cancel the whole order. The selection is checked against what Ozon reports back and refused on a mismatch, since cancelling the wrong line is not undoable. reason_id from list_cancel_reasons; "504" (изменить заказ и оформить заново) is the neutral default, "508" needs a comment. Check cancelled in the result — Ozon may answer with a retention offer instead, and detail then carries what it asked.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skusNoCancel only these lines (skus from order_products()) and leave the rest of the order standing. Omit to cancel the whole order.
orderYesAn order number ("44563249-0877") — the order_number field of a list_orders() entry. Its detail_link is accepted too, since the number is encoded in it.
commentNoFree-text explanation. Required by the catch-all reason (needs_comment=true).
reason_idNoA reason_id from list_cancel_reasons(); "504" (изменить заказ и оформить заново) is the neutral default and needs no comment.504
return_to_cartNoPut the cancelled items back in the cart, so the order can be recomposed.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
skusNo
detailNo
cancelledNo
reason_idNo
order_numberYes
returned_to_cartNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.2.1

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: default return-to-cart behavior, item-by-item cancellation possible, mismatch refusal due to non-undoability, reason_id defaults, and the possibility of a retention offer requiring the agent to check the `cancelled` field. These are significant beyond any schema info.

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 concise yet dense, with each sentence serving a purpose. It front-loads the core action and default behavior, then layers optional parameters and edge-case handling. No redundant words; the structure logically flows from what the tool does to how to use the parameters and what to check in the response.

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 complexity of cancellation (partial vs whole, reason validation, non-undoable mismatch, retention offers), the description covers all critical aspects. The output schema exists, so return structure is not needed in the description, but the description still points out the `cancelled` and `detail` fields, which is essential for correct handling. Complete for an agent to invoke correctly.

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

Parameters4/5

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

Schema coverage is 100% and parameters are well documented in the schema. The description adds practical semantics: explains the neutral default '504', that '508' requires a comment, and that skus selection is validated against Ozon reports. This goes beyond the schema's basic descriptions, providing extra decision guidance for the agent.

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 cancels an order and by default returns items to the cart. It differentiates from sibling tools by specifying partial cancellation via skus and the overall order-level action. The verb 'Cancel' and resource 'order' are explicit, and the behavior is distinct from cart/list management siblings.

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 for when to use the tool (cancelling an order or specific lines) and references list_cancel_reasons as the source for reason_id. It implies the cancellation flow but does not explicitly state when not to use it or name alternative tools for order modifications. Still, the usage is well implied and actionable.

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

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/Alexander-Zhukov/ozon-mcp'

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