From 03a3ca7651af9804fefe364a040af191229ea198 Mon Sep 17 00:00:00 2001 From: Tyler Longwell Date: Tue, 30 Sep 2025 10:57:10 -0400 Subject: [PATCH] remove anyOf from create_task tool --- .../src/agents/recipe_tools/dynamic_task_tools.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/crates/goose/src/agents/recipe_tools/dynamic_task_tools.rs b/crates/goose/src/agents/recipe_tools/dynamic_task_tools.rs index 978b80ab6044..bda327fdf7df 100644 --- a/crates/goose/src/agents/recipe_tools/dynamic_task_tools.rs +++ b/crates/goose/src/agents/recipe_tools/dynamic_task_tools.rs @@ -27,18 +27,18 @@ pub fn create_dynamic_task_tool() -> Tool { "properties": { "task_parameters": { "type": "array", - "description": "Array of tasks. Each needs 'instructions' OR 'prompt'.", + "description": "Array of tasks. Each task must have either 'instructions' OR 'prompt' field (at least one is required).", "items": { "type": "object", "properties": { - // Required (one of these) + // Either instructions or prompt is required (validated at runtime) "instructions": { "type": "string", - "description": "Task instructions" + "description": "Task instructions (required if prompt is not provided)" }, "prompt": { "type": "string", - "description": "Initial prompt" + "description": "Initial prompt (required if instructions is not provided)" }, // Optional - auto-generated if not provided "title": {"type": "string"}, @@ -66,11 +66,7 @@ pub fn create_dynamic_task_tool() -> Tool { "type": "boolean", "description": "If true, return only the last message from the subagent (default: false, returns full conversation)" } - }, - "anyOf": [ - {"required": ["instructions"]}, - {"required": ["prompt"]} - ] + } }, "minItems": 1 },