diff --git a/README.md b/README.md index 1778d73..3402a39 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,27 @@ https://github.com/user-attachments/assets/76a26130-a216-4371-a6b3-937b8fda092a +
+6. 发表评论到帖子 + +支持自动发表评论到小红书帖子。 + +**功能说明:** +- 自动定位评论输入框 +- 输入评论内容并发布 +- 支持 HTTP API 和 MCP 工具调用 + +**⚠️ 重要提示:** +- 需要先登录才能使用此功能 +- 需要提供帖子ID、xsec_token和评论内容 +- 这些参数可以从Feed列表或搜索结果中获取 + +**发表评论演示:** + +https://github.com/user-attachments/assets/cc385b6c-422c-489b-a5fc-63e92c695b80 + +
+ **小红书基础运营知识** - **标题:(非常重要)小红书要求标题不超过 20个字** @@ -318,7 +339,7 @@ npx @modelcontextprotocol/inspector 使用步骤: - 使用 MCP Inspector 测试连接 - 测试 Ping Server 功能验证连接 -- 检查 List Tools 是否返回 4 个工具 +- 检查 List Tools 是否返回 6 个工具 @@ -343,9 +364,11 @@ npx @modelcontextprotocol/inspector 连接成功后,可使用以下 MCP 工具: - `check_login_status` - 检查小红书登录状态(无参数) -- `publish_content` - 发布图文内容到小红书(需要:title, content, 可选:images, video) +- `publish_content` - 发布图文内容到小红书(必需:title, content, images) - `list_feeds` - 获取小红书首页推荐列表(无参数) - `search_feeds` - 搜索小红书内容(需要:keyword) +- `get_feed_detail` - 获取帖子详情(需要:feed_id, xsec_token) +- `post_comment_to_feed` - 发表评论到小红书帖子(需要:feed_id, xsec_token, content) ### 2.4. 使用示例 diff --git a/streamable_http.go b/streamable_http.go index e0a235b..c1ea893 100644 --- a/streamable_http.go +++ b/streamable_http.go @@ -166,13 +166,13 @@ func (s *AppServer) processToolsList(request *JSONRPCRequest) *JSONRPCResponse { }, { "name": "publish_content", - "description": "发布小红书内容(支持图文或视频)", + "description": "发布小红书图文内容", "inputSchema": map[string]interface{}{ "type": "object", "properties": map[string]interface{}{ "title": map[string]interface{}{ "type": "string", - "description": "内容标题", + "description": "内容标题(小红书限制:最多20个中文字或英文单词)", }, "content": map[string]interface{}{ "type": "string", @@ -180,17 +180,14 @@ func (s *AppServer) processToolsList(request *JSONRPCRequest) *JSONRPCResponse { }, "images": map[string]interface{}{ "type": "array", - "description": "图片路径列表,支持本地路径或URL", + "description": "图片路径列表,支持本地路径或URL(至少需要1张图片)", "items": map[string]interface{}{ "type": "string", }, - }, - "video": map[string]interface{}{ - "type": "string", - "description": "视频文件路径(发布视频时使用)", + "minItems": 1, }, }, - "required": []string{"title", "content"}, + "required": []string{"title", "content", "images"}, }, }, {