Skip to main content
Glama

把商品同步到通路

publish_listing

把已上架的商品放上通路,或修改它在通路的分類等欄位。之後數量、價格、內容與上下架都自動同步:在通路賣出會扣這裡的數量,在這裡被鎖定或賣出也會扣通路的。回傳 channel_class_required 時,從 details.candidates 挑一個 class_id 再呼叫一次;回傳 channel_fields_required 時,把 details.class_id 與 details.fields 列的欄位放進 attributes 再呼叫一次。酷澎只收全新品(is_new 為 true),而且要等酷澎審核通過才開賣(期間狀態是 pending)。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "manage_url": "<manage_url>",
      "channel": "<channel>"
    },
    "name": "publish_listing"
  }
}

Input Schema

NameRequiredDescriptionDefault
brandNo選填。酷澎上顯示的品牌;沒有品牌可以不給。
api_keyNo帳號金鑰。Authorization 標頭無法設定時才用這個參數。
channelYes通路代號。ruten 是露天市集(二手、全新都能賣);coupang 是酷澎(只收全新商品)。
class_idNo通路最末層的商品分類代碼,用 search_channel_classes 找。不給就由平台挑。
locationNo選填。露天的出貨地縣市,例如 台中市。
conditionNo選填。露天的新舊代碼:1 全新,2 不到一週,3 不滿一個月,4 一到三個月,5 未滿半年,6 未滿一年,7 一到二年,8 二到三年,9 三年以上。不給時全新品是 1,二手依商品狀況的文字判斷。
attributesNo選填。酷澎分類必填的購買選項,「欄位名稱 → 值」,例如 {"數量":"1個","容量":"500ml"}。不給就由平台填;填不出來會回 channel_fields_required,details.fields 列出還缺的欄位與可用單位。
manage_urlYes商品的管理連結(上架或 list_my_listings 回傳的 manage_url),也可以直接給商品 id。
stock_statusNo選填。多久內出貨。

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / api_key
      Added value: +{
      +  "description": "帳號金鑰。Authorization 標頭無法設定時才用這個參數。",
      +  "type": "string"
      +}
    • changedInput schema / properties / condition / description
      Previous value: -"選填。露天的新舊代碼:1 全新,2 不到一週,3 不滿一個月,4 一到三個月,5 未滿半年,6 未滿一年,7 一到二年,8 二到三年,9 三年以上。不給就依商品狀況的文字判斷。"New value: +"選填。露天的新舊代碼:1 全新,2 不到一週,3 不滿一個月,4 一到三個月,5 未滿半年,6 未滿一年,7 一到二年,8 二到三年,9 三年以上。不給時全新品是 1,二手依商品狀況的文字判斷。"
    • changedInput schema / properties / manage_url / description
      Previous value: -"上架時回傳的管理連結。"New value: +"商品的管理連結(上架或 list_my_listings 回傳的 manage_url),也可以直接給商品 id。"
  2. Changed6 schema fields changed
    • addedInput schema / properties / attributes
      Added value: +{
      +  "description": "選填。酷澎分類必填的購買選項,「欄位名稱 → 值」,例如 {\"數量\":\"1個\",\"容量\":\"500ml\"}。不給就由平台填;填不出來會回 channel_fields_required,details.fields 列出還缺的欄位與可用單位。",
      +  "type": "object"
      +}
    • addedInput schema / properties / brand
      Added value: +{
      +  "description": "選填。酷澎上顯示的品牌;沒有品牌可以不給。",
      +  "type": "string"
      +}
    • changedInput schema / properties / channel / description
      Previous value: -"通路代號。ruten 是露天市集。"New value: +"通路代號。ruten 是露天市集(二手、全新都能賣);coupang 是酷澎(只收全新商品)。"
    • changedInput schema / properties / channel / enum
      Previous value: -[
      -  "ruten"
      -]New value: +[
      +  "ruten",
      +  "coupang"
      +]
    • changedInput schema / properties / class_id / description
      Previous value: -"露天最末層的商品分類代碼,用 search_channel_classes 找。不給就由平台挑。"New value: +"通路最末層的商品分類代碼,用 search_channel_classes 找。不給就由平台挑。"
    • changedInput schema / properties / location / description
      Previous value: -"選填。出貨地縣市,例如 台中市。"New value: +"選填。露天的出貨地縣市,例如 台中市。"
  3. Added

TDQS

A3.7/5.0
Behavior4/5

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

The only annotation is readOnlyHint=false, so the description carries the burden and does so well: it discloses bidirectional stock sync (a sale on the channel decrements local stock and vice versa), the auto-synced fields (quantity, price, content, listing state), and Coupang's pending-approval lifecycle. It stops short of saying whether the operation is idempotent or what a successful response contains.

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?

Structure is front-loaded and logical: purpose, then sync behavior, then error-recovery flows, then the Coupang caveat. It is dense but each sentence carries information an agent needs; the compound sync sentence is the only one that could be split for readability.

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 9-parameter, mutating tool with a nested object and no output schema, the definition covers the essentials: side effects, channel-specific constraints, and the two structured error codes with recovery steps. The main gap is the success-path return value, which matters because no output schema exists to document it.

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?

Schema coverage is 100%, so the schema already explains every parameter including the condition codes and channel enum; the baseline is 3. The description does add cross-parameter meaning that the schema cannot express — class_id comes from details.candidates, and attributes must be populated from details.fields — but those are retry mechanics rather than per-parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a concrete verb+resource pair: it puts an already-created listing onto a channel, or edits its channel-side fields such as category. That implicitly separates it from create_listing/update_listing, but it never names a sibling, so an agent must still infer whether to create first or call this directly.

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

Usage Guidelines3/5

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

It scopes usage to '已上架的商品' and supplies explicit follow-up steps for the channel_class_required and channel_fields_required responses, which is genuinely operational guidance. However, it never says when NOT to use it, nor routes the agent to unpublish_listing/update_listing for the alternative cases, leaving the sibling choice to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.