Skip to main content
Glama
tzangms

shopline-mcp

by tzangms

get_customer_lifecycle

Compare RFM segment migration between two time periods to analyze customer lifecycle changes. Identify upgraded, churned, new, and lost customers for targeted retention strategies.

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
r_daysNoRecency 門檻天數(最近消費 ≤ 此值為高 R)
f_thresholdNoFrequency 門檻(消費 ≥ 此值為高 F)
m_thresholdNoMonetary 門檻金額(累計 ≥ 此值為高 M)
period1_endYes第一期結束日期 YYYY-MM-DD
period2_endYes第二期結束日期 YYYY-MM-DD
period1_startYes第一期起始日期 YYYY-MM-DD
period2_startYes第二期起始日期 YYYY-MM-DD
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It transparently states that it calls GET /v1/orders/search twice (once per period) and describes the return structure (period1, period2, segment_migration, etc.). This provides useful behavioral context, though it does not mention potential performance or rate-limit implications.

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 is compact and well-structured with clear sections (用途, API call, return structure). Each sentence contributes meaningful information without redundancy, and the core purpose is front-loaded.

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

Completeness4/5

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

For a moderately complex analysis tool with no output schema, the description supplies essential context: purpose, API invoked, and return structure. It covers the key aspects an agent would need to invoke it correctly, though it leaves out details about the migration matrix format. Overall, it is sufficiently complete.

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?

The input schema already provides descriptions for all seven parameters (e.g., r_days, f_threshold, m_threshold, and date ranges), so the schema description coverage is 100%. The tool description adds no additional parameter-specific meaning, so the baseline of 3 is appropriate.

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: '比較兩個時間區間的 RFM 分群遷移' (compare RFM segment migration between two time periods). It specifies the exact actions (calculate segments, compare migration, identify upgrades/churn/new/lost customers) and outputs a migration matrix, distinguishing it from sibling tools like get_rfm_analysis.

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 clear context via the 用途 section, explaining that it supports customer lifecycle analysis and strategy formulation. However, it does not explicitly name alternative tools or state when not to use it, so it lacks the highest-level guidance.

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