From adbc47ddc91fa365f9caae2f00b297b9d8fad422 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 8 Jan 2026 10:05:29 -0800 Subject: [PATCH] fix: downgrade McpError logging from warning to debug level (#8371) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MCP errors from external servers (e.g., "The specified key does not exist") are user-facing issues, not system errors. Downgrading the log level from warning to debug prevents these expected failures from triggering production alerts in Datadog/Sentry. Fixes #8370 🤖 Generated with [Letta Code](https://letta.com) Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com> Co-authored-by: datadog-official[bot] Co-authored-by: Kian Jones <11655409+kianjones9@users.noreply.github.com> --- letta/services/mcp/base_client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/letta/services/mcp/base_client.py b/letta/services/mcp/base_client.py index 3e5008c9..5e444e04 100644 --- a/letta/services/mcp/base_client.py +++ b/letta/services/mcp/base_client.py @@ -82,7 +82,10 @@ class AsyncBaseMCPClient: result = await self.session.call_tool(tool_name, tool_args) except Exception as e: if e.__class__.__name__ == "McpError": - logger.warning(f"MCP tool '{tool_name}' execution failed: {str(e)}") + # MCP errors are typically user-facing issues from external MCP servers + # (e.g., resource not found, invalid arguments, permission errors) + # Log at debug level to avoid triggering production alerts for expected failures + logger.debug(f"MCP tool '{tool_name}' execution failed: {str(e)}") raise parsed_content = []