Skip to main content
Glama
tzangms

shopline-mcp

by tzangms

get_product_by_sku

Look up a product's stock, price, and image URL by exact SKU, including matched variant details.

Instructions

以 SKU 精準查詢單一商品的貨況(庫存、價格)與商品圖 URL。

等同於 get_product_list(sku=...),但額外把該 SKU 對應的變體明細 (matched_variants)挑出來,查單一貨品時讀起來更直接。 需要一次查多個條件或列清單時請用 get_product_list。

【呼叫的 Shopline API】

  • GET /v1/products/search?sku={sku}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skuYes商品或變體的 SKU(完全相符)
Behavior4/5

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

No annotations are provided, so the description carries full responsibility for behavioral disclosure. It transparently describes the operation as a query (查詢) and specifies the underlying Shopline API call as GET /v1/products/search?sku={sku}, implying a read-only side-effect-free action. It also discloses that it returns variant details (matched_variants) beyond the basic product info. However, it does not explicitly state error behavior or response structure.

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 three concise, information-dense sentences plus the API endpoint. It front-loads the primary purpose, then the usage comparison, then guidance, with no redundant filler. Every sentence earns its place.

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 simple one-parameter read-only tool with no output schema, the description adequately covers the purpose, usage context, return content (stock, price, image URL, matched_variants), and the underlying API. It misses exact response structure/format, but this is acceptable given the tool's simplicity.

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 schema already provides 100% coverage for the single parameter `sku`, describing it as '商品或變體的 SKU(完全相符)' (product/variant SKU, exact match). The description adds minimal extra meaning — it reiterates the precise SKU query and mentions variant details, but does not introduce new parameter semantics beyond what the schema already contains.

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 function: '以 SKU 精準查詢單一商品的貨況(庫存、價格)與商品圖 URL' (query a single product's stock/price and image URL by SKU). It also distinguishes itself from the sibling get_product_list by noting it extracts matched_variants for a single SKU, making it more direct for single-item queries.

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?

Explicit usage guidance is provided: use this tool for single-SKU queries ('查單一貨品時讀起來更直接'), and use get_product_list when querying multiple conditions or listing items ('需要一次查多個條件或列清單時請用 get_product_list'). It also mentions the functional equivalence to get_product_list(sku=...), clarifying the relationship.

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