Skip to main content
Glama

get_customer_lifecycle

Compare RFM segmentation across two time periods to analyze customer lifecycle changes, identifying upgraded, churned, new, and lost customers with a migration matrix.

Instructions

比較兩個時間區間的 RFM 分群遷移,分析客戶生命週期變化。

【用途】分別計算兩個時段的客戶 RFM 分群,然後比較客戶在兩期之間的分群遷移, 找出升級(segment 改善)、流失(segment 退步)、新增、消失的客戶, 產出分群遷移矩陣,協助制定客戶經營策略。 【呼叫的 Shopline API】

  • GET /v1/orders/search(兩個時段各查詢一次) 【回傳結構】dict 含 period1、period2、segment_migration、upgrade_count、churn_count、new_count、lost_count。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
period1_startYes第一期起始日期 YYYY-MM-DD
period1_endYes第一期結束日期 YYYY-MM-DD
period2_startYes第二期起始日期 YYYY-MM-DD
period2_endYes第二期結束日期 YYYY-MM-DD
r_daysNoRecency 門檻天數(最近消費 ≤ 此值為高 R)
f_thresholdNoFrequency 門檻(消費 ≥ 此值為高 F)
m_thresholdNoMonetary 門檻金額(累計 ≥ 此值為高 M)
Behavior3/5

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

No annotations are provided, so the description must fully disclose behavior. It mentions the API call (GET /v1/orders/search) and output keys, implying a read-only operation. However, it does not explicitly state that it is read-only, does not describe side effects, authorization needs, or rate limits. The transparency is adequate but incomplete.

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 structured with sections (purpose, API, return structure) and is front-loaded with the main action. It is moderately concise, but could be shortened by removing the redundant 【用途】header. Overall, it is well-organized and every sentence provides useful information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the moderate complexity (7 parameters, no output schema, no annotations), the description covers the purpose, API call, and return keys. However, it lacks details on error handling, data limits, prerequisites, or explicit read-only declaration. Without an output schema, the description of the return structure is somewhat helpful but not exhaustive.

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 description coverage is 100%, so baseline is 3. The description provides context for the thresholds (r_days, f_threshold, m_threshold) by explaining their roles in segment migration, but does not add significant meaning beyond the schema descriptions. No enums or nested objects require further detail.

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: comparing RFM segment migration between two time periods for customer lifecycle analysis. It uses specific verbs (比較, 分析) and resources (RFM分群, 客戶生命週期). It is distinguishable from sibling tools like get_rfm_analysis by emphasizing the two-period comparison.

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?

The description explains the use case (分析客戶生命週期變化) and mentions it can help formulate strategies, but it does not explicitly specify when to use this tool versus alternatives (e.g., for single-period RFM, use get_rfm_analysis). The purpose section implies the context, but no direct exclusion guidance is given.

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