From 5ed56f83929f7260f3c40734d9b48d1fb1efcd49 Mon Sep 17 00:00:00 2001 From: Dominik Liebler Date: Tue, 9 Sep 2025 08:52:47 +0200 Subject: [PATCH] fix: skip Slack context parameters in tool call execution --- internal/handlers/llm_mcp_bridge.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/handlers/llm_mcp_bridge.go b/internal/handlers/llm_mcp_bridge.go index 1008c378..1579870f 100644 --- a/internal/handlers/llm_mcp_bridge.go +++ b/internal/handlers/llm_mcp_bridge.go @@ -442,6 +442,12 @@ func (b *LLMMCPBridge) getClientForTool(toolName string) mcp.MCPClientInterface // executeToolCall executes a detected tool call (using the new ToolCall struct) func (b *LLMMCPBridge) executeToolCall(ctx context.Context, toolCall *ToolCall, extraArgs map[string]interface{}) (string, error) { for k, v := range extraArgs { + // Skip Slack context parameters as they're for internal tracking, not tool parameters + if k == "channel_id" || k == "thread_ts" { + b.logger.DebugKV("Skipping Slack context parameter", "key", k, "tool", toolCall.Tool) + continue + } + // Add any extra arguments to the tool call args if toolCall.Args == nil { toolCall.Args = make(map[string]interface{})