Skip to main content
Glama
tzangms

shopline-mcp

by tzangms

redeem_coupon

Redeem a coupon by marking it as used for checkout. Validates coupon data, applies the discount, and records the redemption, making the coupon non-reusable for POS or API integration.

Instructions

[WRITE] 核銷(使用)優惠券。

【用途】 在結帳或特定場景下核銷優惠券,將優惠券標記為已使用狀態。 適合 POS 場景或 API 整合的結帳流程。

【呼叫的 Shopline API】

  • POST /v1/coupons/redeem

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

【副作用】

  • 優惠券狀態變更為已使用,不可再次使用(一次性優惠券)

  • 核銷紀錄會寫入系統,影響促銷統計報告

  • 操作通常不可逆,請確認核銷對象與條件正確

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coupon_dataYes優惠券核銷資料,通常包含 coupon_code 與訂單或客戶識別資訊
Behavior5/5

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

With no annotations provided, the description fully carries the burden of behavioral disclosure. It explicitly lists side effects (coupon becomes used, affects statistics, irreversible), gives the return structure, and notes the API endpoint. This exceeds typical transparency.

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-organized with clear sections for purpose, usage, API, return structure, and side effects. Every section is informative and no content is redundant. It is appropriately sized and front-loaded.

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?

The description is complete for a mutation tool with no annotations and no output schema: it covers purpose, appropriate scenarios, the underlying API call, return structure, and side effects including irreversibility. It provides sufficient context for an agent to invoke the tool safely.

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 only parameter is coupon_data, and the schema description already provides a basic meaning (usually contains coupon_code and order/customer info). The tool description adds no additional parameter elaboration, so the score stays at the baseline of 3 given 100% schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '核銷(使用)優惠券' (redeem/use coupon) and marks it as used. However, it does not explicitly differentiate from sibling tools like claim_coupon, so it misses the top score.

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 this tool ('適合 POS 場景或 API 整合的結帳流程' - suitable for POS scenarios or API-integrated checkout flows), but it does not mention alternatives or exclusions, such as not using it for claiming coupons.

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