Skip to main content
Glama
tzangms

shopline-mcp

by tzangms

send_coupon

Send a coupon to a specific customer for marketing campaigns, loyalty rewards, or CRM triggers. The coupon is delivered directly to the customer's account.

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 與目標客戶識別資訊
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses side effects: coupon appears in customer account, quantity limits may cause errors, and some coupon types cannot be recalled. It also mentions the API call and error conditions. However, it does not discuss idempotency, auth requirements, or rate limits, which are relevant for a write operation.

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: purpose, API endpoint, return structure, and side effects. It starts with a concise one-line summary and each section contributes valuable information without redundancy. The length is appropriate for the tool's complexity.

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?

Despite no output schema, the description explicitly defines the return structure (dict with success, resource_id, message, result). It covers purpose, API, side effects, and error conditions. For a simple write tool with one parameter, this is highly complete and leaves no significant gaps for an agent to misuse it.

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 has one parameter, coupon_data, with a description: "優惠券發送資料,通常包含 coupon_id 與目標客戶識別資訊". Since schema description coverage is 100%, the baseline is 3. The tool description itself does not add further detail about the parameter structure beyond what the schema already provides.

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 opens with a clear, specific statement: "[WRITE] 發送優惠券給指定客戶" (Send coupon to specified customer). This directly states the action (send), resource (coupon), and target (specified customer), and also lists common use cases like marketing campaigns and CRM triggers, which differentiate it from sibling tools such as claim_coupon and redeem_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 clear usage context: "常用於行銷活動、客戶回饋、CRM 觸發場景" (commonly used in marketing campaigns, customer feedback, CRM trigger scenarios). It does not explicitly name alternatives or state when not to use the tool, but the '主動' (proactive) framing implies distinction from customer-initiated actions like claim_coupon.

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