Skip to main content
Glama
tzangms

shopline-mcp

by tzangms

cancel_order

Cancel a specific order to handle customer cancellations, stock shortages, or payment failures. Returns success status and resource ID for confirmation.

Instructions

[WRITE] 取消訂單。

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

【呼叫的 Shopline API】

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

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

【副作用】

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

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

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

Input Schema

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

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

With no annotations provided, the description fully discloses behavioral traits: it marks the operation as irreversible, notes that cancellation may fail if the order is already shipped, and states that refunds are handled separately for paid orders. It also includes the return structure (dict with success, resource_id, message), which goes beyond basic safety 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 well-structured into concise sections (purpose, API, return structure, side effects) with no fluff. Every section adds value, and the key info is front-loaded with the [WRITE] tag and purpose.

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?

For a write operation with no output schema, the description is complete: it explains the API endpoint, return structure, side effects, and conditions affecting cancelability. The parameter schema covers the arguments, so the agent has everything needed to invoke the tool correctly.

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 input schema already provides 100% coverage with descriptions for both parameters (order_id and reason). The tool description adds no additional parameter-specific guidance, so the schema carries the burden. Baseline score 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 tool cancels a specified order (取消指定訂單) and lists specific use cases (customer request, stock shortage, payment issues). This distinguishes it from sibling tools like update_order or update_order_status, which handle other order modifications.

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 clear context for when to use the tool by listing scenarios such as customer cancellation requests and stock issues. However, it does not explicitly contrast with alternatives or state exclusions (e.g., when not to use), relying mostly on implied usage from the purpose.

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/tzangms/shoplinemcp'

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