Skip to main content
Glama

SocialDataX 小红书 Xiaohongshu XHS RedNote MCP

xhs_get_note_sub_comments_by_comment_id

Read-only

根据 note_id 和一级评论 comment_id 获取二级评论;用户已提供完整合法的 ID 组合时直接使用;已有 note_id 或笔记链接但缺少必需 ID 时,调用对应一级评论工具补全;缺少笔记定位信息时向用户索取;支持 page_token 翻页。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "note_id": "<note_id>",
      "comment_id": "<comment_id>"
    },
    "name": "xhs_get_note_sub_comments_by_comment_id"
  }
}

Input Schema

NameRequiredDescriptionDefault
note_idYesnote_id 是小红书笔记 ID。已有完整 note_id 时原样使用;否则可从笔记搜索、笔记详情、评论、标签页笔记列表或用户发帖列表结果复制;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。
comment_idYes一级评论 ID;用户已提供时直接使用,否则可从一级评论结果 items[].comment_id 复制;不要传二级评论项自身的 comment_id。
page_tokenNo分页令牌。首次请求留空;继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回。page_token 是不透明分页令牌;只能用于同一 note_id 和 comment_id 的二级评论列表,不能跨笔记或一级评论复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / items / items / properties / is_deleted
      Added value: +{
      +  "default": false,
      +  "description": "评论是否标记为已删除;false 不保证评论仍可见;已删除的评论及其回复仍保留",
      +  "title": "Is Deleted",
      +  "type": "boolean"
      +}
  2. Changed2 schema fields changed
    • changedOutput schema / properties / points / description
      Previous value: -"本次成功调用的积分消耗与调用完成时的账户积分余额。"New value: +"本次成功调用的积分消耗与账户积分余额。"
    • changedOutput schema / properties / points / properties / balance / description
      Previous value: -"本次接口完成时看到的当前积分余额,可为负数。"New value: +"优先返回调用完成时查询到的账户积分余额。查询失败时,回退到本次预扣后的余额快照。余额可为负数。"
  3. Changed2 schema fields changed
    • changedOutput schema / properties / points / properties / balance / description
      Previous value: -"本次接口完成时看到的当前积分余额。"New value: +"本次接口完成时看到的当前积分余额,可为负数。"
    • removedOutput schema / properties / points / properties / balance / minimum
      Removed value: -0
  4. Changed35 schema fields changed
    • addedOutput schema / properties / items / items / properties / author / properties / avatar_url / title
      Added value: +"Avatar Url"
    • addedOutput schema / properties / items / items / properties / author / properties / name / title
      Added value: +"Name"
    • addedOutput schema / properties / items / items / properties / author / properties / profile_url / title
      Added value: +"Profile Url"
    • addedOutput schema / properties / items / items / properties / author / properties / red_id / title
      Added value: +"Red Id"
    • addedOutput schema / properties / items / items / properties / author / properties / user_id / title
      Added value: +"User Id"
    • addedOutput schema / properties / items / items / properties / author / title
      Added value: +"AuthorSummary"
    • addedOutput schema / properties / items / items / properties / comment_id / title
      Added value: +"Comment Id"
    • addedOutput schema / properties / items / items / properties / content / title
      Added value: +"Content"
    • addedOutput schema / properties / items / items / properties / content_type / title
      Added value: +"Content Type"
    • addedOutput schema / properties / items / items / properties / image_items / items / properties / image_url / title
      Added value: +"Image Url"
    • addedOutput schema / properties / items / items / properties / image_items / items / title
      Added value: +"CommentImageItem"
    • addedOutput schema / properties / items / items / properties / image_items / title
      Added value: +"Image Items"
    • addedOutput schema / properties / items / items / properties / ip_location / title
      Added value: +"Ip Location"
    • addedOutput schema / properties / items / items / properties / is_author_comment / title
      Added value: +"Is Author Comment"
    • addedOutput schema / properties / items / items / properties / is_pinned / title
      Added value: +"Is Pinned"
    • addedOutput schema / properties / items / items / properties / like_count / title
      Added value: +"Like Count"
    • addedOutput schema / properties / items / items / properties / mentioned_users / items / properties / name / title
      Added value: +"Name"
    • addedOutput schema / properties / items / items / properties / mentioned_users / items / properties / user_id / title
      Added value: +"User Id"
    • addedOutput schema / properties / items / items / properties / mentioned_users / items / title
      Added value: +"CommentMentionedUser"
    • addedOutput schema / properties / items / items / properties / mentioned_users / title
      Added value: +"Mentioned Users"
    • addedOutput schema / properties / items / items / properties / note_id / title
      Added value: +"Note Id"
    • addedOutput schema / properties / items / items / properties / parent_comment_id / title
      Added value: +"Parent Comment Id"
    • addedOutput schema / properties / items / items / properties / publish_time / title
      Added value: +"Publish Time"
    • addedOutput schema / properties / items / items / properties / referenced_notes / items / properties / note_id / title
      Added value: +"Note Id"
    • addedOutput schema / properties / items / items / properties / referenced_notes / items / properties / note_type / title
      Added value: +"Note Type"
    • addedOutput schema / properties / items / items / properties / referenced_notes / items / properties / title / title
      Added value: +"Title"
    • addedOutput schema / properties / items / items / properties / referenced_notes / items / title
      Added value: +"ReferencedNote"
    • addedOutput schema / properties / items / items / properties / referenced_notes / title
      Added value: +"Referenced Notes"
    • addedOutput schema / properties / items / items / properties / reply_count / title
      Added value: +"Reply Count"
    • addedOutput schema / properties / items / items / properties / voice_duration_seconds / title
      Added value: +"Voice Duration Seconds"
    • changedOutput schema / properties / items / items / properties / voice_info / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "duration_ms": {
      -        "anyOf": [
      -          {
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "语音时长,单位毫秒;没有时长时为 null"
      -      }
      -    },
      -    "required": [
      -      "duration_ms"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "duration_ms": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "语音时长,单位毫秒;没有时长时为 null",
      +        "title": "Duration Ms"
      +      }
      +    },
      +    "required": [
      +      "duration_ms"
      +    ],
      +    "title": "CommentVoiceInfo",
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / items / items / title
      Added value: +"NoteCommentItem"
    • addedOutput schema / properties / items / title
      Added value: +"Items"
    • addedOutput schema / properties / next_page_token / title
      Added value: +"Next Page Token"
    • addedOutput schema / title
      Added value: +"NoteSubCommentsResult"
  5. Changed2 schema fields changed
    • addedOutput schema / properties / items / items / properties / referenced_notes
      Added value: +{
      +  "description": "评论中引用的笔记信息;无引用笔记时为空数组",
      +  "items": {
      +    "properties": {
      +      "note_id": {
      +        "description": "评论中引用的笔记 ID",
      +        "type": "string"
      +      },
      +      "note_type": {
      +        "description": "引用笔记类型,可选:image(图文)、video(视频)",
      +        "enum": [
      +          "image",
      +          "video"
      +        ],
      +        "type": "string"
      +      },
      +      "title": {
      +        "description": "评论中引用的笔记标题",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "note_id",
      +      "title",
      +      "note_type"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / items / items / required
      Previous 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"
      -]New value: +[
      +  "comment_id",
      +  "note_id",
      +  "content",
      +  "content_type",
      +  "image_items",
      +  "voice_info",
      +  "voice_duration_seconds",
      +  "mentioned_users",
      +  "referenced_notes",
      +  "publish_time",
      +  "like_count",
      +  "reply_count",
      +  "parent_comment_id",
      +  "is_pinned",
      +  "is_author_comment",
      +  "ip_location",
      +  "author"
      +]
  6. Changed3 schema fields changed
    • changedInput schema / properties / comment_id / description
      Previous value: -"一级评论 ID。可直接传一级评论结果中的 comment_id"New value: +"一级评论 ID;用户已提供时直接使用,否则可从一级评论结果 items[].comment_id 复制;不要传二级评论项自身的 comment_id。"
    • 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 时原样使用;否则可从笔记搜索、笔记详情、评论、标签页笔记列表或用户发帖列表结果复制;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"
  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 是不透明分页令牌;只能用于同一 note_id 和 comment_id 的二级评论列表,不能跨笔记或一级评论复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。"
    • 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 只能用于同一 note_id 和 comment_id 的二级评论列表,不能跨笔记或一级评论复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。"
  8. 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"
      -]New value: +[
      +  "items",
      +  "next_page_token",
      +  "points"
      +]
  9. 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;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"
  10. 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;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"
  11. 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;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"
  12. 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 只绑定当前用户、笔记或评论链路,不能跨用户、笔记或评论链路复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。"
  13. 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;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"
  14. 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"
  15. 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"
      +]
  16. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds real behavioral context beyond that: the tool depends on a prerequisite call chain to obtain a first-level comment_id, and results are paged via page_token. It does not describe ordering or how many sub-comments come back per page, which keeps it short of a 5.

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?

One compact sentence sequence with semicolon-delimited branches, front-loaded with the core action followed by the fallback conditions. No filler or redundant restatement of the name.

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?

With an output schema, full parameter descriptions, and annotations in place, the description supplies the remaining missing piece: the prerequisite chain and paging behavior. Minor gaps such as pagination completeness or ordering are non-critical for correct invocation.

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% and the property descriptions already spell out ID provenance and the opaque page_token rules in detail. The description only echoes 'supports page_token paging' without adding format or constraint detail beyond the schema, so baseline 3 applies.

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?

States a specific verb and resource in the opening clause: fetch second-level (sub) comments for a given note_id and first-level comment_id. This clearly separates it from the first-level comment tools in the sibling list, and it names the sibling category (一级评论工具) that produces the required comment_id.

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

Usage Guidelines5/5

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

Gives explicit branch logic: use IDs directly when the user supplies a complete valid pair; fall back to the first-level comment tool when note_id or link exists but the required ID is missing; ask the user when note-location info is absent. When-to-use, when-to-fall-back, and when-to-ask are all covered.

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