get_category_tree
Retrieve all product categories as a tree structure to analyze the store's category hierarchy and parent-child relationships. Use it to identify category IDs and names, then filter products or fetch details.
Instructions
取得所有商品分類並組成樹狀結構。
【用途】 瀏覽商店的完整分類層級,了解分類架構與父子關係。 可用於確認分類 ID、名稱,再搭配 get_category_detail 取得個別分類詳情, 或搭配商品工具按分類篩選商品。
【呼叫的 Shopline API】
GET /v1/categories
【回傳結構】 dict 含 total, tree[](樹狀), flat[](扁平列表)。 每個節點包含 id, name, parent_id, children[](僅在 tree 中)。
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_category_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||