fix(mcp): tolerate legacy tool DTO fields
All checks were successful
Code Review / ai-code-review (push) Successful in 10s
CD Pipeline / tests (push) Successful in 1m9s
CD Pipeline / build-and-deploy (push) Successful in 3m18s
CD Pipeline / post-deploy-checks (push) Successful in 1m27s

This commit is contained in:
Your Name
2026-05-06 16:11:26 +08:00
parent 72811b967e
commit 60c00d7a5d
4 changed files with 42 additions and 6 deletions

View File

@@ -30,7 +30,9 @@ class MCPTool:
name: str
description: str
input_schema: dict[str, Any]
server_name: str
# 2026-05-06 Codex: 部分舊 provider 的 list_tools() 尚未傳 server_name
# 先給 DTO 預設值registry 會以 provider.name 補正,避免啟動登記直接 crash。
server_name: str = ""
@dataclass