---
document_id: agent.paths.agent.querying
schema_version: 2
parent_document_id: agent.paths.agent
section: querying
---

<!-- Generated by scripts.build_agent_guide; do not edit. -->

# MCP queries and task execution / MCP 查询与任务执行

## Understand the task / 先判断要查什么

先用对话里已有的信息判断对象、平台、时间与范围。只有缺失信息会实质改变查询时才澄清，不固定要求用户填一张表。销量、商品实时信息、买家评论和社媒热度不是同一种证据。

Use the conversation to establish the subject, platform, time and scope. Clarify only missing information that materially changes the query; do not require a fixed form. Sales, current product details, buyer reviews and social engagement are distinct evidence.

天猫/京东品牌先读[销量方法](https://docs.asklear.cn/agent/cookbook/sales_analysis)确认范围，已有适用确认直接复用。其他明确的小查询直接执行。模糊或多步分析按需读[销量](https://docs.asklear.cn/agent/cookbook/sales_analysis)、[社媒](https://docs.asklear.cn/agent/cookbook/social_content_analysis)或[评论](https://docs.asklear.cn/agent/cookbook/product_review_analysis)方法；其他任务仍可正常发现能力，不因没有方法而拒绝。

Tmall/JD brands first read the [sales method](https://docs.asklear.cn/en/agent/cookbook/sales_analysis) to confirm scope; reuse applicable confirmation. Run other clear small queries directly. For ambiguous or multi-step analysis, consult the [sales](https://docs.asklear.cn/en/agent/cookbook/sales_analysis), [social](https://docs.asklear.cn/en/agent/cookbook/social_content_analysis) or [review](https://docs.asklear.cn/en/agent/cookbook/product_review_analysis) method as needed. Other tasks remain discoverable even without a method.

## Choose the next step / 根据问题选择下一步

这是选择依据，不是每次都要执行的固定流程。使用对话中已有信息和当前工具契约，复杂任务再按需读取方法。

These are selection cues, not a mandatory sequence. Use conversation context and current tool contracts; consult methods only for tasks that need them.

| User needs / 用户需要什么 | Start with / 怎样开始 |
| --- | --- |
| Historical sales or revenue / 历史销量、销售额 | Use the relevant monthly dataset; resolve identity only if unclear. / 使用对应月表；对象不清楚才先解析。 |
| Current product details / 商品当前详情 | Use a product detail capability, not a sales table. / 使用商品详情能力，不能拿销量表替代。 |
| Buyer experience and problems / 买家体验与问题 | Use reviews, resolving the product and requested filters. / 选择商品评论能力，对齐商品与筛选范围。 |
| Social discussions, use cases or events / 社媒讨论、场景或事件 | Choose platform, search terms and filters for the purpose. / 按目的选平台、检索词及条件，再使用对应能力。 |
| Continue existing work / 继续已有任务 | Read the original task and saved results first. / 先读取原任务状态和已有结果。 |
| Other needs / 其他需求 | Use actual tools and discovery beyond the method list. / 通过实际工具与能力发现继续，不受方法目录限制。 |

## Use the actual tools / 选择实际提供的工具

以 tools/list 的名字与输入 schema 为准。月度销量：精确商品 URL/ID 可直接 query_metrics；商品名先 search_products 选择身份；未知品牌、店铺或品类先 search_values，明确后再查询。不确定数据集才列数据集，不确定字段或契约出错才 describe，不无理由重复探索。

Use tool names and input schemas from tools/list. For monthly sales, exact URLs/IDs can go directly to query_metrics; resolve product names with search_products and unknown brands, shops or categories with search_values. List datasets only when uncertain, and describe only for missing fields or contract errors; avoid repeated discovery without a reason.

远程任务使用认证 discover 返回的 operation_id。未知能力按平台→能力摘要→具体契约逐步发现；已知或已有适用契约时直接读取或复用，不猜操作名。run 提交，task 读状态和结果，cancel 按返回合同停止任务。

For remote tasks, use operation_id returned by authenticated discover. Discover unknown capabilities through platforms, previews and a specific contract; read a known contract directly or reuse an applicable one. Do not guess operation names. Submit with run, read state/results with task and cancel according to its contract.

旧采集能力按实际提供的 list_collection_tasks、describe_collection_task 和任务工具执行；需要已登录页面时使用[独立本地浏览器连接](https://docs.asklear.cn/agent/browser)。不要把 HTTP method/path 或外层请求字段拼进 MCP 参数。

Use the available collection list, description and job tools for legacy collection. For signed-in pages, use the [separate local browser connection](https://docs.asklear.cn/en/agent/browser). Do not insert HTTP paths or outer request fields into MCP arguments.

## Retrieve data, handle bulk scope and charges / 取数、批量与费用

参数与可用范围以当前工具合同和响应为准。按用户目的决定少量查询或批量范围；必要时先试抓验证，再继续约定范围。不同平台分别确认检索条件与分页，不能复制另一平台的 ID、枚举或筛选条件。

Current tool contracts and responses define inputs and coverage. Choose a small query or bulk scope from the user’s purpose; pilot when needed before continuing the agreed range. Resolve filters and pagination independently per platform; do not copy platform-specific IDs or enums.

按实际返回的批准、预算、分页和等待提示继续，不新增固定审批步骤。复用适用结果和任务上下文，保存已完成范围及进度；需要计算时用确定性代码，不靠语言模型口算。

Follow actual approval, budget, pagination and waiting instructions without adding a universal approval step. Reuse applicable results and task context, save completed scope and progress, and use deterministic code for calculations.

已有结果或任务 ID 时先读回，不为继续读取而重新执行。结果未知或出错按[恢复指南](https://docs.asklear.cn/agent/recovery)。说明平台、时间、实际覆盖与缺口；不把样本率、评论数或互动热度当作总体销量。

Read existing results or task IDs before executing again. Use [recovery guidance](https://docs.asklear.cn/en/agent/recovery) for unknown outcomes or errors. State platform, time, actual coverage and gaps; do not turn sample ratios, review counts or engagement into population sales.

## Scope, results and files / 范围、结果与文件

月表的“最新”按各数据集最近一个完整月处理；明确月份原样发送。报告实际时间、水位和缺失范围，不静默换月、补零或把 Top N 当全量。

For monthly tables, latest means each dataset’s latest complete month; preserve explicitly requested months. Report actual time, watermark and gaps without substituting periods, filling zeros or treating Top N as complete coverage.

同一任务可选的 task_query 保持一致，不含凭据或个人信息。费用以当前返回的上界、批准要求和实际扣费为准。

Keep the optional task_query consistent for the task and exclude credentials or personal information. Follow returned cost bounds, approval requirements and actual charges.

用程序计算汇总与比例，说明筛选、指标、分组和结果是否截断。保存已有结果；用户需要文件时才调用可用的 export，按原 job_id 续查，不重做成功取数。 [导出规则](https://docs.asklear.cn/agent/reference#export)。

Compute totals and ratios in code; state filters, metrics, grouping and truncation. Save existing results. Use an available export tool only for a requested file and continue with the original job_id without repeating successful queries. [Export reference](https://docs.asklear.cn/en/agent/reference#export).

具体工具条件、配额与旧采集流程见[工具参考](https://docs.asklear.cn/agent/reference#use)（docs(page="agent.paths.agent.reference")）；具体字段和操作以 tools/list、discover 或 describe 返回为准。

See the [tool reference](https://docs.asklear.cn/en/agent/reference#use) (docs(page="agent.paths.agent.reference")) for tool conditions, quotas and legacy collection. Actual fields and operations come from tools/list, discover or describe.
