Skip to main content
Glama
tzangms

shopline-mcp

by tzangms

update_affiliate_campaign

Update an existing affiliate campaign by adjusting commission rates, duration, or eligibility conditions. Changes take effect immediately for new orders.

Instructions

[WRITE] 更新聯盟行銷活動。

【用途】 修改已建立的聯盟行銷活動,例如調整佣金比例、活動期限或適用條件。

【呼叫的 Shopline API】

  • PUT /v1/affiliate_campaigns/{campaign_id}

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

【副作用】

  • 修改立即生效;佣金規則調整後,新訂單將套用新規則

  • 已產生的佣金紀錄不受影響(依各活動的歷史快照而定)

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYes聯盟行銷活動 ID
campaign_dataYes要更新的活動欄位(僅傳入需修改的欄位)
Behavior5/5

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

With no annotations provided, the description carries the full disclosure burden and handles it excellently. It reveals immediate effect of changes, that new orders apply new rules while existing commission records are unaffected (snapshot-dependent), irreversibility, and the ability to overwrite by calling again. The return structure (success, resource_id, message) is also disclosed.

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 into labeled sections (用途, API, 回傳結構, 副作用) with no filler. It is front-loaded with the [WRITE] marker and purpose, and every section provides distinct actionable information, making it efficiently scannable for an agent.

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 mutation tool with no annotations and no output schema, the description is remarkably complete: it covers the purpose, maps to the underlying API endpoint, specifies the return format, and details side effects. The partial-update semantics of campaign_data are implicit in the schema and reinforced with examples, so the agent has enough context to invoke the tool 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?

Schema description coverage is 100%, with clear descriptions already present for campaign_id and campaign_data. The description adds value by giving concrete examples of campaign_data fields (commission ratio, duration, applicable conditions), which is especially helpful given additionalProperties:true and no fixed sub-schema for the nested object.

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 the verb and resource: '修改已建立的聯盟行銷活動' (modify existing affiliate campaign) with concrete examples like commission rate, duration, and conditions. The [WRITE] prefix reinforces the mutation nature, and the focus on updating existing campaigns distinguishes it from sibling tools such as create_affiliate_campaign, delete_affiliate_campaign, and list_affiliate_campaigns.

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 【用途】 section explicitly frames when to use this tool: to modify already-created affiliate campaigns, with examples of adjustable fields. This provides clear usage context, though it does not explicitly name alternatives or state when NOT to use it (e.g., 'use create_affiliate_campaign for new campaigns'), which keeps it from 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