Skip to content

Commit 1944a99

Browse files
committed
fix: remove sending errors back to model
1 parent 0639f62 commit 1944a99

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backend/cmd/tools/tools.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ func executeMCPTool(toolCall ToolCall) string {
8787
}, nil)
8888

8989
if err != nil {
90-
log.Error("Error connecting to MCP server", "err", err, "endpoint", server.Endpoint)
91-
return fmt.Sprintf("Cannot connect to MCP server '%s': %s", server.Name, err.Error())
90+
log.Error("Error connecting to MCP server", "err", err)
91+
return "Error connecting to MCP server"
9292
}
9393

9494
mcpSessionManager.add(server.ID, session)
@@ -117,7 +117,7 @@ func executeMCPTool(toolCall ToolCall) string {
117117

118118
// session.Close() // this might throw the same error if connection is broken
119119

120-
return fmt.Sprintf("Tool execution failed: %s. The connection will be retried on the next attempt.", err.Error())
120+
return "Tool execution failed!"
121121
}
122122

123123
output := result.Content

0 commit comments

Comments
 (0)