Cross-period product sets
Compare product-ID sets returned by one bundled period call.
Document ID:
agent.dataset.tmall.task.cross_period_productsAuthenticated 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 products in the first period.
Request contract
metrics: unitsgroup_by: product_id, title, product_urlfilter: category_l3 eq $scopetime: $periods.firstlimit: 1000 - 3
query_second_period · query_metricsQuery products in the second period.
Request contract
metrics: unitsgroup_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": [
"units"
],
"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": [
"units"
],
"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
compare_sets · set_differenceCompute new, missing, and retained product IDs.
source_steps: query_first_period, query_second_periodOutput policy
- State period direction and list exact product IDs, titles, and canonical URLs.
Stop conditions
- Stop when the periods or scope are not comparable.
- Stop and report truncation when either period response has meta.truncated=true.
Limitations
- Absence means no returned units in the queried data, not a launch claim.
- The comparison requires complete source queries; use each response's meta.truncated flag as the source of truth.