Skip to main content
Glama

list_customer_groups

Retrieve a list of customer groups with optional name search. Use to browse segments or obtain group IDs for further queries.

Instructions

取得客戶群組列表,支援依名稱搜尋。

【用途】 瀏覽或搜尋已建立的客戶群組(分群)。可用於確認客戶標籤分群策略、 取得群組 ID 後進一步查詢群組成員。

【呼叫的 Shopline API】

  • GET /v1/customer-groups(無搜尋條件時)

  • GET /v1/customer-groups/search(有搜尋條件時)

【回傳結構】 dict 含 total_found, returned, groups[]。 每個 group 包含 id, name, customers_count, created_at。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
search_keywordNo群組名稱搜尋關鍵字
max_resultsNo最多回傳筆數
Behavior5/5

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

No annotations are provided, so the description fully bears the burden. It discloses that the tool calls different API endpoints depending on the search condition and describes the return structure in detail. This goes beyond minimal requirements.

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?

The description is well-structured with clear sections and uses bullet points. It is slightly longer than necessary but every sentence adds value. It is front-loaded with the purpose.

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 (2 optional parameters, no output schema), the description is complete. It covers API endpoints, return structure, and usage context without any 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?

Schema coverage is 100%, providing a baseline of 3. The description adds value by explaining the conditional API endpoint behavior based on 'search_keyword', which is not captured in the schema. This enhances understanding.

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 purpose: to list or search customer groups. It distinguishes from sibling tools like list_customers by focusing on groups. The verb '取得' (get) and resource '客戶群組列表' (customer group list) are specific.

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

Usage Guidelines4/5

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

The description provides explicit use cases: confirming group strategies and obtaining group IDs for further queries. However, it lacks guidance on when not to use this tool or 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/asgard-ai-platform/mcp-shopline'

If you have feedback or need assistance with the MCP directory API, please join our Discord server