Skip to main content
Glama

SocialDataX 小红书 Xiaohongshu XHS RedNote MCP

xhs_get_note_comments_by_note_id

Read-only

根据 note_id 获取单篇小红书笔记的一级评论,支持 sort_type 评论排序和 page_token 翻页。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
note_idYesnote_id 是小红书笔记 ID。已有完整 note_id 时原样使用;否则可从笔记搜索、笔记详情、评论、标签页笔记列表或用户发帖列表结果复制;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。
sort_typeNo评论排序方式,可选:default(默认/综合排序)、time_descending(最新评论优先)、like_count_descending(点赞最多优先)default
page_tokenNo分页令牌。首次请求留空;继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回。page_token 是不透明分页令牌;只能用于同一笔记和 sort_type 的一级评论列表,不能跨笔记或 sort_type 复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes当前页一级评论列表
pointsYes本次成功调用的积分消耗与调用完成时的账户积分余额。
comment_countYes整篇笔记的总评论数,含一级评论与回复;不是当前页 items 数量
next_page_tokenYes下一页不透明分页令牌;为空表示没有更多结果。继续翻页时必须将返回的完整 next_page_token 原样作为 page_token 传回。next_page_token 只能用于同一笔记和 sort_type 的一级评论列表,不能跨笔记或 sort_type 复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。
top_level_comment_countYes整篇笔记的一级评论总数,不含回复;不是当前页 items 数量;无法获取时为 null

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / note_id / description
      Previous value: -"note_id 是小红书笔记 ID。必须原样复制笔记搜索、笔记详情、评论、标签页笔记列表或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"New value: +"note_id 是小红书笔记 ID。已有完整 note_id 时原样使用;否则可从笔记搜索、笔记详情、评论、标签页笔记列表或用户发帖列表结果复制;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"
    • changedOutput schema / properties / items / items / properties / note_id / description
      Previous value: -"note_id 是小红书笔记 ID。必须原样复制笔记搜索、笔记详情、评论、标签页笔记列表或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"New value: +"note_id 是小红书笔记 ID。已有完整 note_id 时原样使用;否则可从笔记搜索、笔记详情、评论、标签页笔记列表或用户发帖列表结果复制;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"
  2. Changed2 schema fields changed
    • changedInput schema / properties / page_token / description
      Previous value: -"分页令牌。首次请求留空;继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回。page_token 是不透明分页令牌,只绑定当前用户、笔记、排序或评论链路,不能跨用户、笔记或评论链路复用;一级评论还不能跨排序复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。"New value: +"分页令牌。首次请求留空;继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回。page_token 是不透明分页令牌;只能用于同一笔记和 sort_type 的一级评论列表,不能跨笔记或 sort_type 复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。"
    • changedOutput schema / properties / next_page_token / description
      Previous value: -"下一页不透明分页令牌;为空表示没有更多结果。继续翻页时必须将返回的完整 next_page_token 原样作为 page_token 传回。next_page_token 只绑定当前用户、笔记或评论链路,不能跨用户、笔记或评论链路复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。"New value: +"下一页不透明分页令牌;为空表示没有更多结果。继续翻页时必须将返回的完整 next_page_token 原样作为 page_token 传回。next_page_token 只能用于同一笔记和 sort_type 的一级评论列表,不能跨笔记或 sort_type 复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。"
  3. Changed2 schema fields changed
    • addedOutput schema / properties / points
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "本次成功调用的积分消耗与调用完成时的账户积分余额。",
      +  "properties": {
      +    "balance": {
      +      "description": "本次接口完成时看到的当前积分余额。",
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "cost": {
      +      "description": "本次请求最终确认消耗的积分。",
      +      "minimum": 0,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "cost",
      +    "balance"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "items",
      -  "next_page_token",
      -  "comment_count",
      -  "top_level_comment_count"
      -]New value: +[
      +  "items",
      +  "next_page_token",
      +  "comment_count",
      +  "top_level_comment_count",
      +  "points"
      +]
  4. Changed2 schema fields changed
    • changedInput schema / properties / note_id / description
      Previous value: -"note_id 是小红书笔记 ID。必须原样复制搜索、详情、评论、标签页笔记列表或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"New value: +"note_id 是小红书笔记 ID。必须原样复制笔记搜索、笔记详情、评论、标签页笔记列表或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"
    • changedOutput schema / properties / items / items / properties / note_id / description
      Previous value: -"note_id 是小红书笔记 ID。必须原样复制搜索、详情、评论、标签页笔记列表或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"New value: +"note_id 是小红书笔记 ID。必须原样复制笔记搜索、笔记详情、评论、标签页笔记列表或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"
  5. Changed2 schema fields changed
    • changedInput schema / properties / note_id / description
      Previous value: -"note_id 是 24 位小写十六进制稳定笔记 ID。必须原样复制搜索、详情、评论、标签页笔记或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"New value: +"note_id 是小红书笔记 ID。必须原样复制搜索、详情、评论、标签页笔记列表或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"
    • changedOutput schema / properties / items / items / properties / note_id / description
      Previous value: -"note_id 是 24 位小写十六进制稳定笔记 ID。必须原样复制搜索、详情、评论、标签页笔记或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"New value: +"note_id 是小红书笔记 ID。必须原样复制搜索、详情、评论、标签页笔记列表或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"
  6. Changed2 schema fields changed
    • changedInput schema / properties / note_id / description
      Previous value: -"note_id 是 24 位小写十六进制稳定笔记 ID。必须原样复制搜索、详情、评论或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"New value: +"note_id 是 24 位小写十六进制稳定笔记 ID。必须原样复制搜索、详情、评论、标签页笔记或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"
    • changedOutput schema / properties / items / items / properties / note_id / description
      Previous value: -"note_id 是 24 位小写十六进制稳定笔记 ID。必须原样复制搜索、详情、评论或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"New value: +"note_id 是 24 位小写十六进制稳定笔记 ID。必须原样复制搜索、详情、评论、标签页笔记或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"
  7. Changed2 schema fields changed
    • changedInput schema / properties / page_token / description
      Previous value: -"分页令牌。首次请求留空;继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回。page_token 是不透明分页令牌,只绑定当前用户、笔记或评论链路,不能跨用户、笔记或评论链路复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。"New value: +"分页令牌。首次请求留空;继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回。page_token 是不透明分页令牌,只绑定当前用户、笔记、排序或评论链路,不能跨用户、笔记或评论链路复用;一级评论还不能跨排序复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。"
    • addedInput schema / properties / sort_type
      Added value: +{
      +  "default": "default",
      +  "description": "评论排序方式,可选:default(默认/综合排序)、time_descending(最新评论优先)、like_count_descending(点赞最多优先)",
      +  "enum": [
      +    "default",
      +    "time_descending",
      +    "like_count_descending"
      +  ],
      +  "type": "string"
      +}
  8. Changed2 schema fields changed
    • changedInput schema / properties / page_token / description
      Previous value: -"分页令牌。首次请求留空;继续翻页时传入上一次返回的 next_page_token"New value: +"分页令牌。首次请求留空;继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回。page_token 是不透明分页令牌,只绑定当前用户、笔记或评论链路,不能跨用户、笔记或评论链路复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。"
    • changedOutput schema / properties / next_page_token / description
      Previous value: -"下一页分页令牌;为空表示没有更多结果"New value: +"下一页不透明分页令牌;为空表示没有更多结果。继续翻页时必须将返回的完整 next_page_token 原样作为 page_token 传回。next_page_token 只绑定当前用户、笔记或评论链路,不能跨用户、笔记或评论链路复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。"
  9. Changed2 schema fields changed
    • changedInput schema / properties / note_id / description
      Previous value: -"小红书笔记 ID。搜索结果、笔记详情、评论或用户发帖列表返回的稳定 note_id 可直接传入"New value: +"note_id 是 24 位小写十六进制稳定笔记 ID。必须原样复制搜索、详情、评论或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"
    • changedOutput schema / properties / items / items / properties / note_id / description
      Previous value: -"稳定笔记 ID"New value: +"note_id 是 24 位小写十六进制稳定笔记 ID。必须原样复制搜索、详情、评论或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"
  10. Changed2 schema fields changed
    • changedInput schema / properties / note_id / description
      Previous value: -"小红书笔记 ID。搜索结果中的 note_id 可直接传入"New value: +"小红书笔记 ID。搜索结果、笔记详情、评论或用户发帖列表返回的稳定 note_id 可直接传入"
    • changedOutput schema / properties / items / items / properties / note_id / description
      Previous value: -"笔记 ID"New value: +"稳定笔记 ID"
  11. Changed3 schema fields changed
    • changedOutput schema / properties / items / items / properties / voice_duration_seconds / description
      Previous value: -"语音评论时长,单位秒;非语音评论或没有时长时为 null"New value: +"兼容字段:语音评论时长,单位秒;非语音评论或没有时长时为 null"
    • addedOutput schema / properties / items / items / properties / voice_info
      Added value: +{
      +  "anyOf": [
      +    {
      +      "properties": {
      +        "duration_ms": {
      +          "anyOf": [
      +            {
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "语音时长,单位毫秒;没有时长时为 null"
      +        }
      +      },
      +      "required": [
      +        "duration_ms"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "语音评论时长信息;非语音评论时为 null"
      +}
    • changedOutput schema / properties / items / items / required
      Previous value: -[
      -  "comment_id",
      -  "note_id",
      -  "content",
      -  "content_type",
      -  "image_items",
      -  "voice_duration_seconds",
      -  "mentioned_users",
      -  "publish_time",
      -  "like_count",
      -  "reply_count",
      -  "parent_comment_id",
      -  "is_pinned",
      -  "is_author_comment",
      -  "ip_location",
      -  "author"
      -]New value: +[
      +  "comment_id",
      +  "note_id",
      +  "content",
      +  "content_type",
      +  "image_items",
      +  "voice_info",
      +  "voice_duration_seconds",
      +  "mentioned_users",
      +  "publish_time",
      +  "like_count",
      +  "reply_count",
      +  "parent_comment_id",
      +  "is_pinned",
      +  "is_author_comment",
      +  "ip_location",
      +  "author"
      +]
  12. Changed7 schema fields changed
    • changedOutput schema / properties / items / items / properties / author / properties / avatar_url / description
      Previous value: -"作者头像链接;当前不可用时为 null"New value: +"作者头像链接;没有头像链接时为 null"
    • changedOutput schema / properties / items / items / properties / author / properties / profile_url / description
      Previous value: -"作者主页链接;当前不可用时为 null"New value: +"作者主页链接;没有主页链接时为 null"
    • changedOutput schema / properties / items / items / properties / author / properties / red_id / description
      Previous value: -"作者公开小红书号;当前不可用时为空字符串"New value: +"作者公开小红书号;没有小红书号时为空字符串"
    • changedOutput schema / properties / items / items / properties / mentioned_users / items / properties / name / description
      Previous value: -"被 @ 用户名称;当前不可用时为空字符串"New value: +"被 @ 用户名称;没有用户名称时为空字符串"
    • changedOutput schema / properties / items / items / properties / mentioned_users / items / properties / user_id / description
      Previous value: -"被 @ 用户的 user_id;当前不可用时为空字符串"New value: +"被 @ 用户的 user_id;没有用户 ID 时为空字符串"
    • changedOutput schema / properties / items / items / properties / voice_duration_seconds / description
      Previous value: -"语音评论时长,单位秒;非语音评论或上游未提供时为 null"New value: +"语音评论时长,单位秒;非语音评论或没有时长时为 null"
    • changedOutput schema / properties / top_level_comment_count / description
      Previous value: -"整篇笔记的一级评论总数,不含回复;不是当前页 items 数量。当前数据源未提供时为 null"New value: +"整篇笔记的一级评论总数,不含回复;不是当前页 items 数量;无法获取时为 null"
  13. Changed17 schema fields changed
    • changedOutput schema / properties / comment_count / description
      Previous value: -"评论总数"New value: +"整篇笔记的总评论数,含一级评论与回复;不是当前页 items 数量"
    • removedOutput schema / properties / items / items / properties / author / properties / avatar
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "作者头像;当前不可用时为 null"
      -}
    • addedOutput schema / properties / items / items / properties / author / properties / avatar_url
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "作者头像链接;当前不可用时为 null"
      +}
    • removedOutput schema / properties / items / items / properties / author / properties / id
      Removed value: -{
      -  "description": "作者 ID",
      -  "type": "string"
      -}
    • addedOutput schema / properties / items / items / properties / author / properties / profile_url
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "作者主页链接;当前不可用时为 null"
      +}
    • addedOutput schema / properties / items / items / properties / author / properties / red_id
      Added value: +{
      +  "description": "作者公开小红书号;当前不可用时为空字符串",
      +  "type": "string"
      +}
    • addedOutput schema / properties / items / items / properties / author / properties / user_id
      Added value: +{
      +  "description": "作者 user_id",
      +  "type": "string"
      +}
    • changedOutput schema / properties / items / items / properties / author / required
      Previous value: -[
      -  "id",
      -  "name"
      -]New value: +[
      +  "user_id",
      +  "name",
      +  "avatar_url",
      +  "profile_url",
      +  "red_id"
      +]
    • addedOutput schema / properties / items / items / properties / content_type
      Added value: +{
      +  "description": "评论内容类型,可选:text(文字)、image(图片)、voice(语音)",
      +  "enum": [
      +    "text",
      +    "image",
      +    "voice"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / items / items / properties / image_items
      Added value: +{
      +  "description": "评论图片列表;无图片时为空数组",
      +  "items": {
      +    "properties": {
      +      "image_url": {
      +        "description": "评论图片链接",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "image_url"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / items / items / properties / is_author_comment
      Added value: +{
      +  "description": "是否为笔记作者本人发布的评论",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / items / items / properties / mentioned_users
      Added value: +{
      +  "description": "评论正文中 @ 到的用户列表;无 @ 时为空数组",
      +  "items": {
      +    "properties": {
      +      "name": {
      +        "description": "被 @ 用户名称;当前不可用时为空字符串",
      +        "type": "string"
      +      },
      +      "user_id": {
      +        "description": "被 @ 用户的 user_id;当前不可用时为空字符串",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "user_id",
      +      "name"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / properties / items / items / properties / parent_comment_id / default
      Removed value: -null
    • addedOutput schema / properties / items / items / properties / voice_duration_seconds
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "语音评论时长,单位秒;非语音评论或上游未提供时为 null"
      +}
    • changedOutput schema / properties / items / items / required
      Previous value: -[
      -  "comment_id",
      -  "note_id",
      -  "content",
      -  "publish_time",
      -  "like_count",
      -  "reply_count",
      -  "is_pinned",
      -  "ip_location",
      -  "author"
      -]New value: +[
      +  "comment_id",
      +  "note_id",
      +  "content",
      +  "content_type",
      +  "image_items",
      +  "voice_duration_seconds",
      +  "mentioned_users",
      +  "publish_time",
      +  "like_count",
      +  "reply_count",
      +  "parent_comment_id",
      +  "is_pinned",
      +  "is_author_comment",
      +  "ip_location",
      +  "author"
      +]
    • addedOutput schema / properties / top_level_comment_count
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "整篇笔记的一级评论总数,不含回复;不是当前页 items 数量。当前数据源未提供时为 null"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "items",
      -  "next_page_token",
      -  "comment_count"
      -]New value: +[
      +  "items",
      +  "next_page_token",
      +  "comment_count",
      +  "top_level_comment_count"
      +]
  14. First observed

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already mark it as readOnly (readOnlyHint=true) and openWorld (openWorldHint=true), so the description doesn't need to repeat those. It adds valuable behavioral context by stating it retrieves only first-level comments, supports sorting (sort_type) and pagination (page_token). This goes beyond the annotations and clarifies operational scope.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, dense sentence that front-loads the core action and key capabilities. There is no wasted wording; it conveys the essential purpose in a compact form.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only tool with an output schema, the description covers the essential behavior (comments retrieval, sorting, pagination) and clarifies scope (first-level). It does not list potential error cases or rate limits, but given the annotations and schema, these are not critical. The description is sufficiently complete for an agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with each parameter (note_id, sort_type, page_token) having detailed descriptions. The tool description itself does not add semantic meaning beyond what the schema already provides; it merely mentions the parameters by name. Baseline 3 is appropriate given the high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb (获取) and resource (单篇小红书笔记的一级评论), and explicitly mentions sorting and pagination capabilities. It naturally distinguishes from sibling tools like xhs_get_note_comments_by_note_url (which uses URL) and xhs_get_note_sub_comments_by_comment_id (sub-comments).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool versus alternatives. While the parameter description for note_id implies it's for when a note_id is available, it does not contrast with the URL-based sibling or mention that this tool only handles first-level comments compared to the sub-comment tool. The guidance is implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources