Skip to main content
Glama

bulk_update_quantities

Update inventory quantities for multiple SKUs in a single request. Ideal for stock adjustments after inventory counts or bulk 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?

Despite no annotations, the description discloses immediate update effects on front-end purchasable quantities, possible skipping of non-existent SKUs, and a recommendation to verify SKUs before execution. This covers key behavioral traits beyond the write nature.

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 labeled sections, but includes some extraneous details like the exact API endpoint (PUT /v1/products/bulk-update-quantities) which may not be necessary for an agent. Still, it remains clear and focused.

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, the description includes the return structure (dict with success, resource_id, message, updated_count). It also covers side effects and preparation advice. For a write tool with one parameter, this is thorough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description adds meaningful semantics: it explains the 'updates' parameter as a list of objects with 'sku' and 'quantity' fields, and that SKU identifies the product/variant. This goes beyond the schema's minimal description.

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's purpose: batch updating inventory quantities for multiple SKUs. It uses the specific verb '批次更新' (batch update) and resource '庫存數量' (inventory quantities), and distinguishes itself from sibling tools like update_product_quantity and update_variation_quantity by highlighting batch efficiency.

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?

Explicitly provides usage scenarios ('適用於盤點後大批調整、進貨入庫等場景') and compares with individual update tools, stating when to use this batch tool for efficiency. No exclusions given, but sufficient context.

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