mcp required args

This commit is contained in:
Shen Junzheng
2025-04-09 00:01:13 +08:00
parent 4250057ba8
commit d92e974ce6
2 changed files with 6 additions and 2 deletions

View File

@@ -26,6 +26,7 @@ var (
"description": "联系人的搜索关键词可以是姓名、备注名或ID。", "description": "联系人的搜索关键词可以是姓名、备注名或ID。",
}, },
}, },
Required: []string{"query"},
}, },
} }
@@ -40,6 +41,7 @@ var (
"description": "群聊的搜索关键词可以是群名称、群ID或相关描述", "description": "群聊的搜索关键词可以是群名称、群ID或相关描述",
}, },
}, },
Required: []string{"query"},
}, },
} }
@@ -67,6 +69,7 @@ var (
"description": "交谈对象可以是联系人或群聊。支持使用ID、昵称、备注名等进行查询。", "description": "交谈对象可以是联系人或群聊。支持使用ID、昵称、备注名等进行查询。",
}, },
}, },
Required: []string{"time", "talker"},
}, },
} }

View File

@@ -92,8 +92,9 @@ type Tool struct {
} }
type ToolSchema struct { type ToolSchema struct {
Type string `json:"type"` Type string `json:"type"`
Properties M `json:"properties"` Properties M `json:"properties"`
Required []string `json:"required,omitempty"`
} }
// { // {