fix: add logger for template variables for mcp
Co-authored-by: Jin Peng <jinjpeng@Jins-MacBook-Pro.local>
This commit is contained in:
@@ -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)"""
|
||||
|
||||
Reference in New Issue
Block a user