Product contribution to change
Attribute cross-period GMV change from two product-level atomic queries.
Document ID:
agent.dataset.tmall.task.product_contributionAuthenticated runtime tools and each query response are authoritative for tenant scope and current data coverage.
This is an MCP query composition, not a complete business report; see Research Methods in the Agent Docs for complete workflows.
Required inputs
scopeRequired · search_valuesExact category scope
category_l3periodsRequired · user_requiredTwo comparable periods
Execution steps
- 1
resolve_scope · search_valuesResolve the category value.
Request contract
category_l3 ← $scope - 2
query_first_period · query_metricsQuery product GMV in the first period.
Request contract
metrics: gmvgroup_by: product_id, title, product_urlfilter: category_l3 eq $scopetime: $periods.firstlimit: 1000 - 3
query_second_period · query_metricsQuery product GMV in the second period.
Request contract
metrics: gmvgroup_by: product_id, title, product_urlfilter: category_l3 eq $scopetime: $periods.secondlimit: 1000
Call example
Replace example values with exact user inputs or platform values returned by search_values.
search_values{
"dataset": "tmall",
"field": "category_l3",
"kw": "示例品类",
"limit": 10,
"task_query": "使用 tmall 数据执行商品变化贡献;scope=示例品类,periods={\"first\":{\"start\":\"2025-01-01\",\"end\":\"2025-03-31\"},\"second\":{\"start\":\"2025-04-01\",\"end\":\"2025-06-30\"}}"
}query_metrics{
"additional_queries": [
{
"filters": [
{
"field": "category_l3",
"op": "eq",
"value": "示例品类"
}
],
"group_by": [
"product_id",
"title",
"product_url"
],
"limit": 1000,
"metrics": [
"gmv"
],
"name": "query_second_period",
"time": {
"end": "2025-06-30",
"start": "2025-04-01"
}
}
],
"dataset": "tmall",
"filters": [
{
"field": "category_l3",
"op": "eq",
"value": "示例品类"
}
],
"group_by": [
"product_id",
"title",
"product_url"
],
"limit": 1000,
"main_query_name": "query_first_period",
"metrics": [
"gmv"
],
"task_query": "使用 tmall 数据执行商品变化贡献;scope=示例品类,periods={\"first\":{\"start\":\"2025-01-01\",\"end\":\"2025-03-31\"},\"second\":{\"start\":\"2025-04-01\",\"end\":\"2025-06-30\"}}",
"time": {
"end": "2025-03-31",
"start": "2025-01-01"
}
}Agent computation
compute_contribution · contributionJoin by product ID, subtract periods, and rank contributions.
source_steps: query_first_period, query_second_periodOutput policy
- Show product IDs, titles, canonical URLs, deltas, and contribution to total change.
Stop conditions
- Stop when periods or filters differ.
- Stop and report truncation when either period response has meta.truncated=true.
Limitations
- Contribution is arithmetic attribution, not causal inference.
- Attribution requires complete source queries; use each response's meta.truncated flag as the source of truth.