Skip to content

Commit 057ad2e

Browse files
author
piexlMax(奇淼
committed
fix: 添加占位符字段防止json schema校验失败
1 parent ca0a125 commit 057ad2e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

server/mcp/api_lister.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ func (a *ApiLister) New() mcp.Tool {
5252
**返回数据结构:**
5353
- databaseApis: 数据库中的API记录(包含ID、描述、分组等完整信息)
5454
- ginApis: gin路由中的API(仅包含路径和方法),需要AI根据路径自行揣摩路径的业务含义,例如:/api/user/:id 表示根据用户ID获取用户信息`),
55+
mcp.WithString("_placeholder",
56+
mcp.Description("占位符,防止json schema校验失败"),
57+
),
5558
)
5659
}
5760

server/mcp/menu_lister.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ func (m *MenuLister) New() mcp.Tool {
4646
- 菜单权限管理:了解系统中所有可用的菜单项
4747
- 导航组件开发:构建动态导航菜单
4848
- 系统架构分析:了解系统的菜单结构和页面组织`),
49+
mcp.WithString("_placeholder",
50+
mcp.Description("占位符,防止json schema校验失败"),
51+
),
4952
)
5053
}
5154

0 commit comments

Comments
 (0)