Skip to main content
Glama

get_category_tree

Retrieve the full category hierarchy of your store to understand the tree structure and parent-child relationships of categories.

Instructions

取得所有商品分類並組成樹狀結構。

【用途】 瀏覽商店的完整分類層級,了解分類架構與父子關係。 可用於確認分類 ID、名稱,再搭配 get_category_detail 取得個別分類詳情, 或搭配商品工具按分類篩選商品。

【呼叫的 Shopline API】

  • GET /v1/categories

【回傳結構】 dict 含 total, tree[](樹狀), flat[](扁平列表)。 每個節點包含 id, name, parent_id, children[](僅在 tree 中)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Describes return structure in detail (total, tree[], flat[], node fields) and the API call. While no annotations exist, the description effectively communicates the read-only nature and output format, though it could mention any rate limits or authentication needs.

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?

Well-structured with clear sections (main purpose, usage, API, return structure). Every sentence adds value, no redundancy.

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 the tool's simplicity (no parameters, no output schema), the description covers all necessary aspects: purpose, usage guidance, API reference, and return format. No gaps.

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?

No parameters exist, so schema coverage is 100%. The description adds value by explaining the return structure beyond what the schema provides, including the distinction between tree and flat arrays.

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 it retrieves all product categories and composes a tree structure, with explicit usage purpose of browsing the complete category hierarchy. It differentiates from sibling tools like get_category_detail.

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?

Provides explicit usage context: confirms category IDs and names, then can be used with get_category_detail for details or with product tools for filtering. Also mentions the underlying API endpoint.

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