From c72728bf3d434afe2942fbec49d2caca6458b05b Mon Sep 17 00:00:00 2001 From: Ramnique Singh <30795890+ramnique@users.noreply.github.com> Date: Wed, 16 Jul 2025 16:23:49 +0530 Subject: [PATCH] agents.ts: fix mock tool creation --- apps/rowboat/app/lib/agents.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/rowboat/app/lib/agents.ts b/apps/rowboat/app/lib/agents.ts index 145b14a3..4899196d 100644 --- a/apps/rowboat/app/lib/agents.ts +++ b/apps/rowboat/app/lib/agents.ts @@ -351,10 +351,14 @@ function createMockTool( return tool({ name: config.name, description: config.description, - parameters: z.object({ - query: z.string().describe("The query to search for") - }), - async execute(input: { query: string }) { + strict: false, + parameters: { + type: 'object', + properties: config.parameters.properties, + required: config.parameters.required || [], + additionalProperties: true, + }, + async execute(input: any) { try { const result = await invokeMockTool( logger,