Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,11 @@ async def call_mcp_endpoint_tool(
raise ValueError(f"参数处理失败: {str(e)}")
raise e

# 加入MAC地址
if mcp_client.conn and mcp_client.conn.device_id:
arguments['mac_address'] = mcp_client.conn.device_id
logger.bind(tag=TAG).info(f"已将设备MAC地址 {mcp_client.conn.device_id} 加入到MCP接入点工具调用参数中")

actual_name = mcp_client.name_mapping.get(tool_name, tool_name)
payload = {
"jsonrpc": "2.0",
Expand All @@ -358,7 +363,7 @@ async def call_mcp_endpoint_tool(
}

message = json.dumps(payload)
logger.bind(tag=TAG).info(f"发送MCP接入点工具调用请求: {actual_name},参数: {args}")
logger.bind(tag=TAG).info(f"发送MCP接入点工具调用请求: {actual_name},参数: {json.dumps(arguments, ensure_ascii=False)}")
await mcp_client.send_message(message)

try:
Expand Down