wait_task
wait_taskPolls one task ID or a batch of up to 20 until a terminal or needs_user state is reached, returning status snapshots; on timeout returns current state so you can call again.
Instructions
等待任务到达停点(阻塞只读原语,合并原 wait_task / wait_any)。单任务模式:提供 taskId,轮询至终态(succeeded/failed/needs_attention/cancelled/interrupted)或 needs_user。批量模式:提供 taskIds(1..20 个,开始前校验全部存在、缺一即报错),等待数组顺序首个到达停点者,返回其快照与全部任务当前状态。两参数必须且只能提供一个。超时(timeoutMs 缺省 50000ms、上限 600000ms)后返回当前状态快照;超时返回时请再次调用本工具继续等待——本调用不影响任务本体,超时/中断均无害。
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "wait_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | No | ||
| taskIds | No | ||
| timeoutMs | No |