Skip to main content
Glama

cancel_order

Cancel a Shopline order for reasons like customer request, inventory shortage, or payment issues. The order status changes to cancelled and cannot be reversed.

Instructions

[WRITE] 取消訂單。

【用途】 取消指定訂單,適用於客戶要求取消、庫存不足或付款問題等場景。

【呼叫的 Shopline API】

  • POST /v1/orders/{order_id}/cancel

【回傳結構】 dict 含 success: bool, resource_id: str, message: str。

【副作用】

  • 訂單狀態變更為已取消,操作不可逆

  • 若訂單已出貨,可能無法取消(取決於 Shopline 規則)

  • 已付款訂單取消後需另行退款

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYes訂單 ID
reasonNo取消原因(選填)
Behavior5/5

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

With no annotations provided, the description carries full burden. It discloses important behavioral traits: order status changes to cancelled, operation is irreversible, may fail if already shipped, and refund may be needed. This is comprehensive behavioral disclosure.

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 description is well-structured with clear sections: [WRITE], purpose, API endpoint, return structure, side effects. It is moderately concise, though it could be slightly shorter. Every section adds value.

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?

Given no output schema, the description explains the return structure (dict with success, resource_id, message). It covers purpose, API endpoint, and side effects. It is mostly complete for a cancellation tool, though it could mention prerequisites like order status or permissions.

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%, so the schema already documents both parameters. The description adds context by implying the required order_id and noting reason is optional. It also connects the parameters to the usage scenarios, providing added meaning.

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 '取消訂單' (cancel order) and lists specific use cases (customer request, insufficient stock, payment issues). It distinguishes itself from sibling tools by explicitly being a cancellation operation, which is unique among order-related tools.

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 provides explicit scenarios for when to use the tool: customer request, insufficient stock, or payment issues. It also mentions side effects like irreversibility and potential failure if shipped. However, it does not explicitly state when not to use it or provide alternatives.

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/asgard-ai-platform/mcp-shopline'

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