Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: add logger for template variables for mcp
jnjpng8d0bc26035ac
diff --git a/letta/functions/mcp_client/types.py b/letta/functions/mcp_client/types.pyindex adf695df8..105368aa3 100644--- a/letta/functions/mcp_client/types.py+++ b/letta/functions/mcp_client/types.py@@ -6,6 +6,8 @@ from typing import Dict, List, Optionalfrom mcp import Toolfrom pydantic import BaseModel, Field+from letta.utils import get_logger+# MCP Authentication ConstantsMCP_AUTH_HEADER_AUTHORIZATION = "Authorization"MCP_AUTH_TOKEN_BEARER_PREFIX = "Bearer"@@ -13,6 +15,8 @@ TEMPLATED_VARIABLE_REGEX = (r"\{\{\s*([A-Z_][A-Z0-9_]*)\s*(?:\|\s*([^}]+?)\s*)?\}\}" # Allows for optional whitespace around the variable name and default value)+logger = get_logger(__name__)+class MCPTool(Tool):"""A simple wrapper around MCP's tool definition (to avoid conflict with our own)"""