Skip to main content
Glama
tzangms

shopline-mcp

by tzangms

update_product_quantity

Set stock quantity for non-variant products after inventory count or restocking. Updates availability immediately; zero disables sales unless overselling is allowed.

Instructions

[WRITE] 更新商品庫存數量(無變體商品)。

【用途】 直接設定無變體商品的庫存數量。適用於盤點後調整庫存或手動補貨場景。 若商品有變體,請改用 update_variation_quantity。

【呼叫的 Shopline API】

  • PUT /v1/products/{product_id}/quantity

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

【副作用】

  • 庫存數量立即更新,影響前台可購買數量

  • 若設為 0 且商品設定不允許超賣,前台將顯示缺貨

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
quantityYes新庫存數量(絕對值,非增減量)
product_idYes商品內部 ID
Behavior5/5

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

With no annotations provided, the description carries the full burden. It discloses the write operation, immediate frontend impact, and out-of-stock behavior when quantity is set to zero. Also includes API endpoint and return structure, providing comprehensive 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?

Well-structured with clear sections (purpose, API, return, side effects) and no redundant text. The main purpose is front-loaded, and each sentence adds value.

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?

Covers purpose, usage context, alternative tools, API endpoint, return structure, and side effects. Fully complete for a simple mutation tool, leaving no significant gaps.

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?

Input schema already covers both parameters with descriptions, including absolute vs. incremental quantity. The description adds minimal extra parameter meaning, so baseline 3 applies given 100% schema coverage.

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?

Description clearly states the tool updates inventory quantity for non-variant products, with a specific verb and resource. It explicitly distinguishes from sibling tools by directing variant products to update_variation_quantity.

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

Usage Guidelines5/5

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

Provides explicit when-to-use context (stocktaking, manual replenishment) and an explicit alternative for products with variations. This fully clarifies usage versus alternatives.

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