Skip to main content
Glama
tzangms

shopline-mcp

by tzangms

bulk_update_quantities

Update inventory quantities for multiple SKUs in one batch. Streamline stock adjustments after inventory counts or restocking.

Instructions

[WRITE] 批次更新多個 SKU 的庫存數量。

【用途】 一次更新多個商品或變體的庫存,適用於盤點後大批調整、進貨入庫等場景。 比逐一呼叫 update_product_quantity / update_variation_quantity 更有效率。

【呼叫的 Shopline API】

  • PUT /v1/products/bulk-update-quantities

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

【副作用】

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

  • 若某 SKU 不存在,API 可能略過或回傳錯誤(取決於 Shopline 實作)

  • 建議先確認 SKU 正確後再執行批次操作

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
updatesYes庫存更新列表,每筆為 {sku: str, quantity: int},以 SKU 識別商品/變體
Behavior5/5

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

With no annotations provided, the description carries full behavioral disclosure. It lists side effects (immediate update affecting frontend purchasable quantities), error behavior (possible skip or error for missing SKUs), and a precaution (verify SKUs before running). This is comprehensive 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 a one-line summary followed by sections for usage, API endpoint, response structure, and side effects. It is compact and every section adds value, though it includes some details (like the exact endpoint) that are not strictly necessary.

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 the tool's complexity (bulk array update), lack of annotations, and lack of output schema, the description covers all essential aspects: purpose, when to use, API endpoint, response shape, side effects, and error caveats. It leaves no major gaps for the agent to invoke it correctly.

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?

The input schema fully describes the 'updates' parameter, including its structure as {sku: str, quantity: int}. The description adds no new parameter-level detail beyond what the schema already provides, so baseline of 3 is appropriate.

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 batch updates inventory quantities for multiple SKUs using a specific verb and resource. It distinguishes itself from sibling tools by explicitly naming update_product_quantity and update_variation_quantity as alternatives, making its scope obvious.

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 gives explicit use cases (inventory adjustments after stocktaking, purchase inbound) and compares efficiency to calling single-update tools. However, it does not explicitly state when not to use it, such as for single SKU updates or if validation is required.

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