From 0a4c60998f114541d3b3bbf28859fd93838139d5 Mon Sep 17 00:00:00 2001 From: Abhijay Jain Date: Tue, 9 Sep 2025 23:02:42 +0530 Subject: [PATCH] Fix : Google AI schema validation by adding missing array items fields (#4569) Signed-off-by: Abhijay007 --- .../agents/recipe_tools/dynamic_task_tools.rs | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 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 43863645..978b80ab 100644 --- a/crates/goose/src/agents/recipe_tools/dynamic_task_tools.rs +++ b/crates/goose/src/agents/recipe_tools/dynamic_task_tools.rs @@ -43,13 +43,25 @@ pub fn create_dynamic_task_tool() -> Tool { // Optional - auto-generated if not provided "title": {"type": "string"}, "description": {"type": "string"}, - "extensions": {"type": "array"}, + "extensions": { + "type": "array", + "items": {"type": "object"} + }, "settings": {"type": "object"}, - "parameters": {"type": "array"}, + "parameters": { + "type": "array", + "items": {"type": "object"} + }, "response": {"type": "object"}, "retry": {"type": "object"}, - "context": {"type": "array"}, - "activities": {"type": "array"}, + "context": { + "type": "array", + "items": {"type": "string"} + }, + "activities": { + "type": "array", + "items": {"type": "string"} + }, "return_last_only": { "type": "boolean", "description": "If true, return only the last message from the subagent (default: false, returns full conversation)"