Skip to main content
Glama
tzangms

shopline-mcp

by tzangms

update_addon_product_quantity

Set a new absolute stock quantity for an addon product using its ID, overwriting the current inventory immediately.

Instructions

[WRITE] 更新加購商品庫存數量。

【用途】 直接以 ID 更新指定加購商品的庫存數量。

【呼叫的 Shopline API】

  • PUT /v1/addon_products/{addon_product_id}/quantity

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

【副作用】

  • 指定加購商品的庫存數量將被覆蓋為新值

  • 庫存變動立即生效

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
quantityYes新的庫存數量(絕對值,非差異)
addon_product_idYes加購商品 ID
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It does disclose the main side effect: the quantity is overwritten and takes effect immediately. However, it does not mention idempotency, required permissions, or error conditions. Given the absence of annotations, this gap is significant for a write operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with sections for purpose, API call, return structure, and side effects. It is front-loaded with a WRITE tag and concise. Slight redundancy exists between the title and first line, but overall it is efficiently organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter write operation, the description covers the main behavior, API endpoint, and side effects. It lacks permission requirements and error handling expectations, but the tool is relatively simple. The return structure is described even without an output schema, which adds completeness. Adequate but not thorough.

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%, so parameters are documented. The description adds value by explaining that quantity is an absolute value, not a delta, which reinforces the schema description. It also clarifies the purpose of addon_product_id. This is above the baseline since it adds meaningful semantic context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool updates the inventory quantity of a specified add-on product by ID, using the verb '更新' (update) with a specific resource (addon product quantity). It distinguishes from the sibling tool update_addon_product_quantity_by_sku by explicitly using ID-based targeting.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use it (when updating quantity by ID) but does not explicitly state when not to use it or mention the alternative by-SKU tool. It provides the calling API path but no explicit exclusions or alternative comparison, so it's adequate but lacks clear selection guidance.

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