Skip to content

prepareMcpTools

prepareMcpTools(statusUpdate, config, tools): DynamicStructuredTool<ToolInputSchemaBase, unknown, unknown, string, unknown, string>[] | undefined

Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/utils/mcpUtils.ts:290

Convert union types to flat types: See https://github.com/langchain-ai/langchainjs/issues/9691 Since LangChain 1.2.1 Gemini explodes with the following error: Error processing message: Agent processing failed: Failed to convert tool ‘mcp_tool_name’ schema for Gemini: zod_to_gemini_parameters: Gemini cannot handle union types (discriminatedUnion, anyOf, oneOf). Consider using a flat object structure with optional fields instead.

StatusUpdateCallback

GthConfig

DynamicStructuredTool<ToolInputSchemaBase, unknown, unknown, string, unknown, string>[] | undefined

DynamicStructuredTool<ToolInputSchemaBase, unknown, unknown, string, unknown, string>[] | undefined