Skip to main content
Glama
DevinChen2014

SocialDataX 小红书 Xiaohongshu XHS RedNote MCP

xhs_get_note_comments_by_note_url

Read-only

Retrieve top-level comments from a Xiaohongshu note by providing its URL, short link, or share text. Supports sorting by time or likes and pagination with page tokens.

Instructions

根据笔记链接、短链接或分享文案获取单篇小红书笔记的一级评论,支持 sort_type 评论排序和 page_token 翻页。 返回的 next_page_token 是不透明分页令牌;继续翻页时必须将完整 next_page_token 原样作为 page_token 传回。next_page_token 只绑定当前用户、笔记、排序或评论链路,不能跨用户、笔记或评论链路复用;一级评论还不能跨排序复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
note_urlYes小红书笔记链接、短链接或分享文案。支持以下形式:1) 小红书笔记长链接;2) xhslink.com / xhslink.cn / xhsurl.com / xhsurl.cn 短链接;3) 包含上述任一链接的完整分享文案。
sort_typeNo评论排序方式,可选:default(默认/综合排序)、time_descending(最新评论优先)、like_count_descending(点赞最多优先)default
page_tokenNo分页令牌。首次请求留空;继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回。page_token 是不透明分页令牌,只绑定当前用户、笔记、排序或评论链路,不能跨用户、笔记或评论链路复用;一级评论还不能跨排序复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。

Output Schema

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

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

Annotations include readOnlyHint=true and openWorldHint=true, indicating a safe read operation. The description adds context about page_token binding rules and the fact that first-level comments cannot be reused across sorts, which goes beyond the annotations. No contradictions.

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

Conciseness4/5

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

Description is a single paragraph but covers core purpose, sorting, pagination, and token rules efficiently. It front-loads the main function. Every sentence adds value; no fluff. Could be slightly more structured with bullet points, but still good.

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?

Given the presence of annotations, full schema coverage, and an output schema (implied), the description covers essential behavioral aspects. It explains pagination mechanics thoroughly. The only minor gap is explicit mention of the output format, but the output schema likely covers that.

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

Parameters4/5

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

Schema coverage is 100%, but the description adds value by explaining supported URL formats for note_url, enum options for sort_type, and detailed constraints for page_token (e.g., not modifying, not using across sorts). This enriches the parameter understanding beyond the schema.

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 clearly states it retrieves first-level comments of a Xiaohongshu note using the note URL, short link, or share text. It distinguishes from sibling tools like `xhs_get_note_comments_by_note_id` (which uses note ID) and `xhs_get_note_sub_comments_by_comment_id` (sub-comments). The verb '获取' and resource '一级评论' are specific.

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

Usage Guidelines4/5

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

Provides explicit instructions for pagination (page_token handling, not modifiable, bound to user/note/sort) and sorting options. Does not explicitly state when to prefer this tool over the note_id variant, but the sibling list provides context. The guidelines are thorough for the intended use case.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DevinChen2014/xiaohongshu-xhs-rednote-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server