remove anyOf from create_task tool (#4897)

This commit is contained in:
tlongwell-block
2025-09-30 14:55:48 -04:00
committed by GitHub
parent 10a15812db
commit b6c4fdaa17
@@ -27,18 +27,18 @@ pub fn create_dynamic_task_tool() -> Tool {
"properties": { "properties": {
"task_parameters": { "task_parameters": {
"type": "array", "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": { "items": {
"type": "object", "type": "object",
"properties": { "properties": {
// Required (one of these) // Either instructions or prompt is required (validated at runtime)
"instructions": { "instructions": {
"type": "string", "type": "string",
"description": "Task instructions" "description": "Task instructions (required if prompt is not provided)"
}, },
"prompt": { "prompt": {
"type": "string", "type": "string",
"description": "Initial prompt" "description": "Initial prompt (required if instructions is not provided)"
}, },
// Optional - auto-generated if not provided // Optional - auto-generated if not provided
"title": {"type": "string"}, "title": {"type": "string"},
@@ -66,11 +66,7 @@ pub fn create_dynamic_task_tool() -> Tool {
"type": "boolean", "type": "boolean",
"description": "If true, return only the last message from the subagent (default: false, returns full conversation)" "description": "If true, return only the last message from the subagent (default: false, returns full conversation)"
} }
}, }
"anyOf": [
{"required": ["instructions"]},
{"required": ["prompt"]}
]
}, },
"minItems": 1 "minItems": 1
}, },