fix: handle None description in MCP tool transformation (#25872)

Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
This commit is contained in:
Novice
2025-09-18 13:11:38 +08:00
committed by GitHub
parent 85cda47c70
commit 21230a8eb2
2 changed files with 213 additions and 1 deletions

View File

@@ -262,7 +262,7 @@ class ToolTransformService:
author=user.name if user else "Anonymous",
name=tool.name,
label=I18nObject(en_US=tool.name, zh_Hans=tool.name),
description=I18nObject(en_US=tool.description, zh_Hans=tool.description),
description=I18nObject(en_US=tool.description or "", zh_Hans=tool.description or ""),
parameters=ToolTransformService.convert_mcp_schema_to_parameter(tool.inputSchema),
labels=[],
)