From 8d0bc26035ac1103e352bc240ae9dd57f2776c3c Mon Sep 17 00:00:00 2001 From: jnjpng Date: Fri, 1 Aug 2025 14:27:00 -0700 Subject: [PATCH] fix: add logger for template variables for mcp Co-authored-by: Jin Peng --- letta/functions/mcp_client/types.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/letta/functions/mcp_client/types.py b/letta/functions/mcp_client/types.py index adf695df..105368aa 100644 --- a/letta/functions/mcp_client/types.py +++ b/letta/functions/mcp_client/types.py @@ -6,6 +6,8 @@ from typing import Dict, List, Optional from mcp import Tool from pydantic import BaseModel, Field +from letta.utils import get_logger + # MCP Authentication Constants MCP_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)"""