Skip to main content
Glama
tzangms

shopline-mcp

by tzangms

update_product_variation

Update specific fields of a product variation such as SKU, options, and status. Only provide fields to change; omitted fields remain unchanged. Changes apply immediately.

Instructions

[WRITE] 更新商品變體資料。

【用途】 修改特定商品變體的 SKU、規格選項、狀態等欄位。僅傳入要修改的欄位, 未傳入的欄位不會被覆蓋。

【呼叫的 Shopline API】

  • PUT /v1/products/{product_id}/variations/{variation_id}

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

【副作用】

  • 變體資料變更立即生效,前台同步更新

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
product_idYes商品內部 ID
variation_idYes變體內部 ID
variation_dataYes要更新的變體欄位(僅需傳入要修改的欄位)
Behavior5/5

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

With no annotations provided, the description discloses important behavioral traits: immediate effect, front-end synchronization, and irreversibility (no version history) but can be overridden by calling again. Also specifies the exact API endpoint and return structure, giving the agent a full picture of side effects and outcome.

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 sections (purpose, API endpoint, return structure, side effects). Each section provides meaningful information without fluff, making it easy to scan and digest.

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 complete: it explains what it does, how to use it (partial update), the expected return shape, and side effects. This covers all critical information an agent needs to invoke and interpret 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 coverage is 100% for all three parameters, so the schema already documents IDs and variation_data. The description adds meaning by clarifying variation_data is a partial update and listing example fields (SKU, spec options, status), which helps the agent construct the nested object correctly.

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 tool updates product variation data with a specific verb (更新) and resource (商品變體資料). It mentions modifying SKU, spec options, status, etc., which distinguishes it from sibling tools that target specific fields like quantity or price.

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?

Provides clear usage context: only pass fields to be modified, untouched fields will not be overwritten. Does not explicitly compare with sibling tools like update_variation_quantity or update_variation_price, but the partial-update note is actionable and helps an agent decide when to call this generic variation update.

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