From dbc3d54fa14152070926ed519fdc4ec4d83655f7 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 28 Oct 2025 18:42:47 +0800 Subject: [PATCH] fix: should add weather mcp --- bots/bot_father.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/bots/bot_father.ts b/bots/bot_father.ts index 65b7715f6..7c4f1d9ad 100644 --- a/bots/bot_father.ts +++ b/bots/bot_father.ts @@ -44,15 +44,10 @@ export abstract class BotFather { : "🌥️ APIFY_API_TOKEN not set; weather updates will be unavailable." ); - let availableTools = [this.mcp]; - if (this.weatherMcp) { - availableTools.push(this.weatherMcp); - } - this.agent = new Agent({ name: this.name, instructions: this.buildInstructions(), - tools: availableTools, + tools: [this.mcp, this.weatherMcp], model: "gpt-4o", modelSettings: { temperature: 0.7, @@ -100,17 +95,13 @@ export abstract class BotFather { }); } - private createWeatherMcpTool(): ReturnType | null { - if (!this.weatherToken) { - return null; - } - + private createWeatherMcpTool(): ReturnType { return hostedMcpTool({ serverLabel: "weather_mcp_server", serverUrl: "https://jiri-spilka--weather-mcp-server.apify.actor/mcp", requireApproval: "never", headers: { - Authorization: `Bearer ${this.weatherToken}`, + Authorization: `Bearer ${this.weatherToken || ""}`, }, }); }