Skip to main content
Glama
tzangms

shopline-mcp

by tzangms

get_stock_by_warehouse

Retrieve stock distribution across warehouses or stores for a specific product or all products. Filter by SKU, product ID, or warehouse to check inventory levels.

Instructions

取得商品在各倉庫/門市的庫存分佈矩陣。可查詢單一商品或全部商品的各倉庫庫存。

查特定貨品時請帶 sku 或 product_id;不帶條件的全掃描因為每個商品都要一次 API 呼叫,會受 max_products 限制(回傳的 scan_truncated 會標示是否被截斷)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skuNo以 SKU 精準定位商品後再查倉庫庫存(建議,快且不會漏)
product_idNo商品 ID(不填則查詢全部商品,但較慢)
max_productsNo未指定商品時最多掃描幾個商品(每個商品需一次 API 呼叫,故較慢)
warehouse_idNo倉庫 ID 篩選(僅看特定倉庫)
Behavior4/5

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

With no annotations provided, the description carries the burden of disclosing behavior. It explains that full scans make one API call per product, are constrained by max_products, and return scan_truncated to indicate truncation. This is valuable operational context, though it does not cover the full return shape or authentication requirements.

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?

The description is compact and front-loaded, using two short paragraphs to convey purpose, query modes, and an important truncation caveat. Each sentence earns its place with no filler or redundant information.

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

Completeness4/5

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

For a tool with no output schema and no annotations, the description covers the primary invocation modes, the warehouse filter concept, and the critical max_products/scan_truncated edge case. It does not specify the exact fields of the returned matrix, but the core usage and behavioral caveats are sufficiently addressed.

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?

The input schema already describes all four parameters, providing a baseline of 3. The description adds meaningful context by explaining the performance implications of max_products and by recommending sku or product_id for fast, complete lookups. It also links the scan_truncated flag to the full-scan behavior, which goes 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 identifies the tool as retrieving a stock distribution matrix across warehouses and stores, for either a single product or all products. This is a specific verb-plus-resource statement that distinguishes it from broader inventory tools by emphasizing per-warehouse/store granularity.

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 explicitly instructs users to pass sku or product_id when querying a specific item and warns that an unconditional full scan is slower and limited by max_products. It provides clear parameter-selection context, though it does not name alternative tools or state explicit exclusions.

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