阻塞等待任务完成
wait_for_taskBlock and wait for an asynchronous task to complete or fail. Receives progress updates and can retry if timeout reached.
Instructions
阻塞等待某个异步任务直到完成/失败或达到单次等待上限。等待期间向支持的客户端发送 MCP 进度通知。达到 timeout_seconds 仍未完成则返回 still-running(含最新状态),可再次调用续等。适合长任务(视频等)。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"task_id": "<task_id>"
},
"name": "wait_for_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | 要等待的 task_id | |
| inline_image | No | 图像结果是否内联回传(默认 true) | |
| sync_upstream | No | 每次轮询是否主动刷新上游状态 | |
| timeout_seconds | No | 单次等待上限秒数,默认 300 |