diff --git a/internal/chatlog/mcp/const.go b/internal/chatlog/mcp/const.go index 35ffe63..64ba277 100644 --- a/internal/chatlog/mcp/const.go +++ b/internal/chatlog/mcp/const.go @@ -26,6 +26,7 @@ var ( "description": "联系人的搜索关键词,可以是姓名、备注名或ID。", }, }, + Required: []string{"query"}, }, } @@ -40,6 +41,7 @@ var ( "description": "群聊的搜索关键词,可以是群名称、群ID或相关描述", }, }, + Required: []string{"query"}, }, } @@ -67,6 +69,7 @@ var ( "description": "交谈对象,可以是联系人或群聊。支持使用ID、昵称、备注名等进行查询。", }, }, + Required: []string{"time", "talker"}, }, } diff --git a/internal/mcp/tool.go b/internal/mcp/tool.go index 5cf3cce..1975740 100644 --- a/internal/mcp/tool.go +++ b/internal/mcp/tool.go @@ -92,8 +92,9 @@ type Tool struct { } type ToolSchema struct { - Type string `json:"type"` - Properties M `json:"properties"` + Type string `json:"type"` + Properties M `json:"properties"` + Required []string `json:"required,omitempty"` } // {