Skip to main content
Glama
tzangms

shopline-mcp

by tzangms

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 中)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the transparency burden and compensates well by disclosing the return structure (dict with total, tree[], flat[] and node fields) and the underlying API endpoint (GET /v1/categories). It does not mention edge cases like inactive categories, but for a read-only list tool this is sufficient.

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 uses clear section headers (用途, API, 回傳結構) and stays concise. Each sentence contributes meaningful information without redundancy, making it easy for an agent to parse.

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?

For a parameterless read-only tool, the description provides complete context: purpose, usage scenarios, related tools, the REST API call, and the full response structure. No output schema exists, so the description appropriately covers return values.

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 has zero parameters, so there are no parameter semantics to explain. A baseline score of 4 is appropriate since the description needs no parameter documentation.

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 opens with a specific verb phrase '取得所有商品分類並組成樹狀結構' (get all product categories and build a tree), clearly distinguishing it from sibling get_category_detail. It also states the resource (categories) and the result format, making the tool's purpose unambiguous.

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?

The 【用途】 section explicitly states when to use the tool (browsing the full category hierarchy) and names companion tools: get_category_detail for individual details and product tools for filtering by category. This provides clear contextual guidance and alternatives.

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