Skip to main content
Glama

send_coupon

Sends a coupon to a specified customer for marketing campaigns or customer rewards. Uses Shopline API to apply discounts directly to customer accounts.

Instructions

[WRITE] 發送優惠券給指定客戶。

【用途】 主動將優惠券發送給特定客戶,常用於行銷活動、客戶回饋、CRM 觸發場景。

【呼叫的 Shopline API】

  • POST /v1/coupons/send

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

【副作用】

  • 優惠券發送後,目標客戶帳號中將出現對應的優惠券

  • 依優惠券設定,可能有數量限制;若庫存不足,API 會回傳錯誤

  • 部分類型的優惠券一旦發送,無法收回

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coupon_dataYes優惠券發送資料,通常包含 coupon_id 與目標客戶識別資訊
Behavior5/5

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

No annotations are provided, so the description carries the full burden. It details side effects such as coupon appearing in customer account, quantity limits, and irreversibility for some coupon types, and mentions the API endpoint and return structure.

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 labeled sections (purpose, API, return, side effects) and is informative without being overly verbose. It is front-loaded with the core function.

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 the tool's complexity (one parameter, no output schema), the description covers purpose, usage context, API details, return structure, and side effects. It lacks explicit error handling details but is otherwise complete.

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 schema coverage is 100%, so baseline is 3. The description does not add additional meaning to the 'coupon_data' parameter beyond the schema's description, which is already somewhat vague.

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 '發送優惠券給指定客戶' (sends coupons to specified customers) and specifies use cases like marketing campaigns and CRM triggers, distinguishing it from customer-initiated actions like claim_coupon.

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 a ['用途'] section explaining when to use the tool (marketing, rewards, CRM), but does not explicitly state when not to use it or list alternative tools.

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