Add files via upload

This commit is contained in:
公明
2026-02-07 00:04:59 +08:00
committed by GitHub
parent 2b6b678439
commit 27b16e0d54
2 changed files with 17 additions and 17 deletions
+5 -5
View File
@@ -224,17 +224,17 @@ func (e *Executor) RegisterTools(mcpServer *mcp.Server) {
toolName := toolConfig.Name
toolConfigCopy := toolConfig
// 使用简短描述(如果存在),否则使用详细描述的前100个字符
// 使用简短描述(如果存在),否则使用详细描述的前10000个字符
shortDesc := toolConfigCopy.ShortDescription
if shortDesc == "" {
// 如果没有简短描述,从详细描述中提取第一行或前100个字符
// 如果没有简短描述,从详细描述中提取第一行或前10000个字符
desc := toolConfigCopy.Description
if len(desc) > 100 {
if len(desc) > 10000 {
// 尝试找到第一个换行符
if idx := strings.Index(desc, "\n"); idx > 0 && idx < 100 {
if idx := strings.Index(desc, "\n"); idx > 0 && idx < 10000 {
shortDesc = strings.TrimSpace(desc[:idx])
} else {
shortDesc = desc[:100] + "..."
shortDesc = desc[:10000] + "..."
}
} else {
shortDesc = desc