Skip to main content
Glama
tzangms

shopline-mcp

by tzangms

update_promotion

Update an existing promotion's details, such as discount amount, validity period, or applicable conditions. Changes apply immediately and are irreversible but can be overwritten.

Instructions

[WRITE] 更新既有促銷活動。

【用途】 修改已建立的促銷活動內容,例如調整折扣金額、有效期限、適用條件等。

【呼叫的 Shopline API】

  • PUT /v1/promotions/{promotion_id}

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

【副作用】

  • 修改立即生效,已在結帳流程中的消費者可能受影響

  • 不可復原(無版本歷史),但可再次呼叫此工具覆蓋

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promotion_idYes促銷活動 ID
promotion_dataYes要更新的促銷活動欄位(僅傳入需修改的欄位)
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 details the API call (PUT /v1/promotions/{promotion_id}), states that changes take effect immediately and may affect consumers in checkout, and explicitly notes irreversibility (though it can be overwritten). It also describes the return structure, providing excellent 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-structured with clear section headers (Purpose, API, Return Structure, Side Effects). Each section is concise and serves a distinct purpose, with no wasted wording. It is front-loaded with the essential purpose and write indicator.

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?

For a write tool with no annotations or output schema, this description is remarkably complete. It covers the purpose, API endpoint, return structure, and side effects—including irreversibility and impact on active checkout flows. The only missing detail is the full promotion_data schema, but that is provided in the input schema.

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?

Schema coverage is 100% with both parameters having descriptions. The description adds examples of what can be updated (discount amount, validity, conditions) but does not substantially explain the structure of promotion_data beyond the schema. It meets the baseline for high schema coverage but does not go beyond it.

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 'update existing promotion' with specific examples of modifiable attributes (discount amount, validity period, conditions). The [WRITE] marker and verb 'update' distinguish it from sibling tools like create_promotion, delete_promotion, and get_promotion_detail.

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 purpose section explicitly indicates this tool is for modifying existing promotions, providing clear context for when to use it. However, it does not explicitly mention alternatives or when not to use it, so it falls short of a 5.

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