addTask
Add a new task to your plan, specifying dependencies, reasoning, and optional placement within MCPlanManager for structured and visualized task management.
Instructions
向当前计划中动态添加一个新任务。
Args: name (str): 新任务的名称,应确保唯一性。 dependencies (List[int]): 新任务所依赖的任务ID的整数列表 (从0开始)。 reasoning (str): 解释为何要添加此任务的字符串。 after_task_id (int, optional): 一个任务ID,新任务将被插入到该任务之后。如果省略,则添加到列表末尾。
Returns: ToolResponse[TaskOutput]: 包含新创建任务的响应对象。
Input Schema
Name | Required | Description | Default |
---|---|---|---|
after_task_id | No | ||
dependencies | Yes | ||
name | Yes | ||
reasoning | Yes |
Input Schema (JSON Schema)
{
"properties": {
"after_task_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "After Task Id"
},
"dependencies": {
"items": {
"type": "integer"
},
"title": "Dependencies",
"type": "array"
},
"name": {
"title": "Name",
"type": "string"
},
"reasoning": {
"title": "Reasoning",
"type": "string"
}
},
"required": [
"name",
"dependencies",
"reasoning"
],
"type": "object"
}