Skip to main content
Glama
tzangms

shopline-mcp

by tzangms

create_promotion

Create new promotions in your Shopline store, including discount codes, buy-one-get-one, and threshold discounts.

Instructions

[WRITE] 建立新促銷活動。

【用途】 在 Shopline 商店中建立新的促銷活動,例如折扣碼、買一送一、滿額折扣等。

【呼叫的 Shopline API】

  • POST /v1/promotions

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

【副作用】

  • 在商店促銷列表中新增一筆促銷活動,活動狀態依 promotion_data 設定而定

  • 若活動設定為立即啟用,消費者即可使用該促銷

  • 促銷規則設定後如需修改,請使用 update_promotion

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promotion_dataYes促銷活動資料(參考 Shopline promotion 物件結構)
Behavior5/5

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

With no annotations provided, the description carries the full transparency burden. It explicitly discloses side effects: adds a promotion to the store list, activation status depends on promotion_data, and immediate activation may make the promotion live to consumers. It also notes the shutdown for modifications via update_promotion and specifies the return structure (dict with success, resource_id, message, promotion).

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 with labeled sections: purpose, API endpoint, return structure, and side effects. Every section adds value and the content is front-loaded with a clear '[WRITE]' tag. It is compact yet covers all essential facets.

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?

For a mutating tool with no output schema, the description supplies return structure and side effects, filling key contextual gaps. It also provides concrete examples of what can be created. Minor omission: it doesn't detail required fields or constraints of promotion_data, but that is delegated to the Shopline object structure reference.

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 covers 100% of the single parameter (promotion_data) with a description that references the Shopline promotion object structure. The tool description does not add further parameter-level detail, but it offers context by listing promotion types in the purpose section. Baseline 3 is appropriate since the schema already handles parameter semantics.

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 '[WRITE] 建立新促銷活動' (create new promotion), using a specific verb and resource. It further clarifies by enumerating promotion types (discount codes, buy-one-get-one, amount discounts) and distinguishes from siblings like update_promotion and delete_promotion.

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 states the tool's purpose and adds an explicit alternative: '促銷規則設定後如需修改,請使用 update_promotion' (if you need to modify promotion rules, use update_promotion). While not a full when/when-not matrix, this gives clear guidance for a primary alternative use case.

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