Skip to main content
Glama

update_addon_product_quantity

Update the inventory quantity of an add-on product by providing its ID and a new absolute quantity. Changes take effect 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
addon_product_idYes加購商品 ID
quantityYes新的庫存數量(絕對值,非差異)
Behavior5/5

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

No annotations provided, so description carries full burden. It explicitly lists side effects: quantity overwritten, changes immediate. Also describes return structure, providing full behavioral context.

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?

Description is well-structured with sections (WRITE tag, purpose, usage, API, return, side effects). Every sentence adds value, no fluff.

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?

Given no output schema, description provides return structure. Side effects and API call are documented. Complete for a simple update tool with two params.

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 already describes both parameters, but description adds key info: 'new quantity (absolute, not difference)'. This adds important semantic context beyond the 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?

The description clearly states it updates addon product inventory quantity by ID. It includes '[WRITE]' and specifies the API endpoint, distinguishing it from siblings like update_addon_product_quantity_by_sku which updates by SKU.

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 description explains the use case (direct ID-based update with absolute quantity) and implies when to use. It does not explicitly state when not to use or mention alternatives, but the context is clear enough.

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