Skip to content

Commit 0c9bef0

Browse files
docs(tasks): clarify task ID format in tool descriptions
Make it explicit that blocked_by expects task IDs in the format task_1, task_2, etc. This helps LLMs use the correct format on first try. Assisted-By: cagent
1 parent e66f981 commit 0c9bef0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/tools/builtin/tasks.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ type Task struct {
3333
ID string `json:"id" jsonschema:"ID of the task"`
3434
Description string `json:"description" jsonschema:"Description of the task"`
3535
Status string `json:"status" jsonschema:"Status: pending, in-progress, or completed"`
36-
BlockedBy []string `json:"blocked_by,omitempty" jsonschema:"IDs of tasks that must be completed before this one can start"`
37-
Blocks []string `json:"blocks,omitempty" jsonschema:"IDs of tasks that are waiting for this one to complete"`
36+
BlockedBy []string `json:"blocked_by,omitempty" jsonschema:"Task IDs (e.g. task_1, task_2) that must be completed before this one can start"`
37+
Blocks []string `json:"blocks,omitempty" jsonschema:"Task IDs that are waiting for this one to complete"`
3838
Owner string `json:"owner,omitempty" jsonschema:"Owner/assignee of this task"`
3939
}
4040

4141
type CreateTaskArgs struct {
4242
Description string `json:"description" jsonschema:"Description of the task,required"`
43-
BlockedBy []string `json:"blocked_by,omitempty" jsonschema:"IDs of tasks that must be completed before this one can start"`
43+
BlockedBy []string `json:"blocked_by,omitempty" jsonschema:"Task IDs (e.g. task_1, task_2) that must be completed first"`
4444
Owner string `json:"owner,omitempty" jsonschema:"Owner/assignee of this task"`
4545
}
4646

4747
type CreateTaskItem struct {
4848
Description string `json:"description" jsonschema:"Description of the task,required"`
49-
BlockedBy []string `json:"blocked_by,omitempty" jsonschema:"IDs of tasks that must be completed before this one can start"`
49+
BlockedBy []string `json:"blocked_by,omitempty" jsonschema:"Task IDs (e.g. task_1, task_2) that must be completed first. For batch creation, use task_N where N is the 1-based position in the final list."`
5050
Owner string `json:"owner,omitempty" jsonschema:"Owner/assignee of this task"`
5151
}
5252

@@ -661,15 +661,15 @@ func (t *TasksTool) Tools(context.Context) ([]tools.Tool, error) {
661661
{
662662
Name: ToolNameCreateTask,
663663
Category: "tasks",
664-
Description: "Create a new task. Use blocked_by to specify dependencies on other tasks.",
664+
Description: "Create a new task. Use blocked_by with task IDs (e.g. [\"task_1\", \"task_2\"]) to specify dependencies.",
665665
Parameters: tools.MustSchemaFor[CreateTaskArgs](),
666666
Handler: tools.NewHandler(t.handler.createTask),
667667
Annotations: tools.ToolAnnotations{Title: "Create Task", ReadOnlyHint: true},
668668
},
669669
{
670670
Name: ToolNameCreateTasks,
671671
Category: "tasks",
672-
Description: "Create multiple tasks at once with dependencies.",
672+
Description: "Create multiple tasks at once with dependencies. Task IDs are assigned as task_1, task_2, etc. Use these IDs in blocked_by.",
673673
Parameters: tools.MustSchemaFor[CreateTasksArgs](),
674674
Handler: tools.NewHandler(t.handler.createTasks),
675675
Annotations: tools.ToolAnnotations{Title: "Create Tasks", ReadOnlyHint: true},

0 commit comments

Comments
 (0)