Skip to main content
Glama

create_promotion

Creates a new promotion in your Shopline store, such as discount codes, buy-one-get-one, or tiered discounts. Define rules and activate by providing promotion data.

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 物件結構)
Behavior4/5

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

No annotations; description discloses side effects: adds promotion, immediate activation possible, mentions update alternative. Lacks permission or reversibility info but adequate.

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?

Well-organized with sections: WRITE mark, purpose, API, return structure, side effects. Every sentence adds value, no redundancy.

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?

Provides return structure and side effects. Single-parameter tool, so low complexity. Description is complete for an agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one parameter (promotion_data) with schema description in Chinese. Description adds context that it follows Shopline's object structure, aiding understanding beyond schema.

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?

Explicitly states 'create new promotion activity' with examples (discount codes, BOGO). Distinguishes from update_promotion in side effects.

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?

Mentions API endpoint and side effects. Implicitly says use when needing a new promotion, and to modify use update_promotion. Could be more explicit about when not to use.

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