Skip to main content
Glama
DevinChen2014

SocialDataX 小红书 Xiaohongshu XHS RedNote MCP

xhs_get_note_comments_by_note_id

Read-only

Fetch first-level comments for a Xiaohongshu note by note_id. Sort by time or likes, and paginate using a page token.

Instructions

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

Input 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

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. Changed8 schema fields changedv0.1.6
    • changedInput schema / properties / note_id / description
      Previous value: -"note_id 是 24 位小写十六进制稳定笔记 ID。必须原样复制搜索、详情、评论或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"New value: +"note_id 是小红书笔记 ID。已有完整 note_id 时原样使用;否则可从笔记搜索、笔记详情、评论、标签页笔记列表或用户发帖列表结果复制;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"
    • 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 / items / items / properties / note_id / description
      Previous value: -"note_id 是 24 位小写十六进制稳定笔记 ID。必须原样复制搜索、详情、评论或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"New value: +"note_id 是小红书笔记 ID。已有完整 note_id 时原样使用;否则可从笔记搜索、笔记详情、评论、标签页笔记列表或用户发帖列表结果复制;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。"
    • 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"
      +]
    • 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 复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。"
    • 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"
      +]
  2. First observedv0.1.5

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds genuine scope context — that it returns only first-level comments and that results are paginated via an opaque token — but says nothing about rate limits, pagination termination, or auth requirements.

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?

A single front-loaded sentence that leads with the action and resource, then appends the two optional capabilities. No redundancy or filler.

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 present and annotations covering the safety profile, the description supplies enough to invoke the tool correctly. The minor omission is the lack of an explicit pointer to the sub-comments or URL-based alternatives, which the agent otherwise has to guess.

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 schema already details note_id format rules, the sort_type enum values, and the page_token contract. The description merely restates that sort_type sorts and page_token pages, adding no semantics beyond the structured fields, so the baseline 3 applies.

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

Purpose4/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 — retrieve first-level comments of a single note keyed by note_id — and the '一级评论' scoping cleanly separates it from the sibling xhs_get_note_sub_comments_by_comment_id. It is clear, though it never names or contrasts the URL-based twin (xhs_get_note_comments_by_note_url), so explicit sibling differentiation is left implicit.

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?

There is no statement of when to prefer this tool over the by_note_url variant, over sub-comments, or any prerequisite/exclusion. The description only lists what features exist (sorting, paging), leaving the agent to infer routing from the name alone.

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