Skip to main content
Glama
DevinChen2014

SocialDataX 小红书 Xiaohongshu XHS RedNote MCP

xhs_search_notes

Read-only

Search Xiaohongshu/RedNote notes by keyword; filter by image or video note type, sort order, and publish time, and page through results with tokens.

Instructions

搜索小红书 / Xiaohongshu / XHS / RedNote 笔记,包含普通、图文和视频笔记;note_type 默认 "all"。查找图文笔记可设 note_type="image",查找视频笔记可设 note_type="video"。发布时间筛选参数名为 publish_time_range(不是 publish_time);本工具不接受 max_items。查找单张图片用 xhs_search_images;已有笔记链接或 note_id 且需要单篇笔记详情时使用对应的详情工具;需要评论、回复或口播转文字时使用相应的 URL/ID 工具;支持 page_token 翻页。继续翻页时必须将返回的完整 next_page_token 原样作为 page_token 传回,不得截断、缩写、掩码或用省略号替换中间内容。 返回的 note_url 在任何使用场景都必须原样保留完整 URL,包括 xsec_token 等 query 参数;例如最终回答、展示、引用、存储、输出或传递;不得用 note_id 重新拼接链接。

Input Schema

NameRequiredDescriptionDefault
keywordYes搜索词,可传关键词或短语,例如品牌名、话题、人物名、产品名或内容需求;不要传笔记链接、主页链接、note_id、user_id 或 page_token。
note_typeNo笔记类型筛选,可选:all(不限,默认)、image(图文)、video(视频)all
sort_typeNo笔记搜索结果排序方式,可选:general(综合,默认)、time_descending(最新发布优先)、like_count_descending(最多点赞优先)、comment_count_descending(最多评论优先)、collect_count_descending(最多收藏优先)general
page_tokenNo笔记搜索分页令牌。首次请求留空;继续翻页时传入上一页返回的完整 next_page_token 原样作为 page_token 传回。page_token 只能用于同一关键词、排序、笔记类型、发布时间范围和调用方的笔记搜索链路;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成。
publish_time_rangeNo发布时间范围筛选,可选:all(不限,默认)、day(一天内)、week(一周内)、half_year(半年内)all

Output Schema

NameRequiredDescriptionDefault
itemsYes笔记搜索结果中的笔记列表,已过滤非笔记卡片与不可公开笔记;当前页过滤后可能为空数组
pointsYes本次成功调用的积分消耗与调用完成时的账户积分余额。
next_page_tokenYes下一页不透明分页令牌;为空表示没有更多结果或无法继续 token 翻页。继续笔记搜索时必须将完整 next_page_token 原样作为 page_token 传回。next_page_token 仅限同一工具、关键词和调用方;保持该工具支持的筛选条件不变,不得跨搜索工具复用。items 为空时不要单独据此判断结束。

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv0.1.6
    • changedInput schema / properties / keyword / description
      Previous value: -"小红书搜索关键词"New value: +"搜索词,可传关键词或短语,例如品牌名、话题、人物名、产品名或内容需求;不要传笔记链接、主页链接、note_id、user_id 或 page_token。"
    • changedInput schema / properties / page_token / description
      Previous value: -"搜索分页令牌。首次请求留空;继续翻页时传入上一页返回的 完整 next_page_token 原样作为 page_token 传回。page_token 只能用于同一关键词、排序、笔记类型、发布时间范围和调用方的搜索链路;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成。"New value: +"笔记搜索分页令牌。首次请求留空;继续翻页时传入上一页返回的完整 next_page_token 原样作为 page_token 传回。page_token 只能用于同一关键词、排序、笔记类型、发布时间范围和调用方的笔记搜索链路;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成。"
    • changedInput schema / properties / sort_type / description
      Previous value: -"搜索结果排序方式,可选:general(综合,默认)、time_descending(最新发布优先)、like_count_descending(最多点赞优先)、comment_count_descending(最多评论优先)、collect_count_descending(最多收藏优先)"New value: +"笔记搜索结果排序方式,可选:general(综合,默认)、time_descending(最新发布优先)、like_count_descending(最多点赞优先)、comment_count_descending(最多评论优先)、collect_count_descending(最多收藏优先)"
    • changedOutput schema / properties / items / description
      Previous value: -"搜索结果中的笔记列表,已过滤非笔记卡片与不可公开笔记;当前页过滤后可能为空数组"New value: +"笔记搜索结果中的笔记列表,已过滤非笔记卡片与不可公开笔记;当前页过滤后可能为空数组"
    • changedOutput schema / properties / items / items / 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 / publish_time / description
      Previous value: -"发布时间,秒级 Unix 时间戳"New value: +"发布时间,秒级 Unix 时间戳;0 表示未知,不应解释为实际发布日期"
    • changedOutput schema / properties / items / items / properties / video / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "duration_ms": {
      -        "anyOf": [
      -          {
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "视频原始时长,单位毫秒;没有时长时为 null"
      -      },
      -      "video_url": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "视频链接;没有视频链接时为 null"
      -      }
      -    },
      -    "required": [
      -      "video_url",
      -      "duration_ms"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "duration_ms": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "视频原始时长,单位毫秒;没有时长时为 null"
      +      },
      +      "height": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "视频高度,像素;没有时为 null"
      +      },
      +      "video_url": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "视频链接;没有视频链接时为 null"
      +      },
      +      "width": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "视频宽度,像素;没有时为 null"
      +      }
      +    },
      +    "required": [
      +      "video_url",
      +      "duration_ms",
      +      "width",
      +      "height"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / items / items / properties / video / description
      Previous value: -"视频摘要信息;仅视频笔记返回对象,图文为 null"New value: +"视频摘要信息;视频笔记也可能为 null,表示未提供视频信息,不代表不是视频;图文为 null"
    • changedOutput schema / properties / next_page_token / description
      Previous value: -"下一页不透明分页令牌;为空表示没有更多结果或无法继续 token 翻页。继续搜索时必须将完整 next_page_token 原样作为 page_token 传回。next_page_token 只能用于同一关键词、排序、笔记类型、发布时间范围和调用方的搜索链路。items 为空时不要单独据此判断结束。"New value: +"下一页不透明分页令牌;为空表示没有更多结果或无法继续 token 翻页。继续笔记搜索时必须将完整 next_page_token 原样作为 page_token 传回。next_page_token 仅限同一工具、关键词和调用方;保持该工具支持的筛选条件不变,不得跨搜索工具复用。items 为空时不要单独据此判断结束。"
    • 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"
      +]
  2. First observedv0.1.5

TDQS

A4.5/5.0
Behavior4/5

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

Annotations cover readOnlyHint and openWorldHint, so safety is already declared; the description adds real behavioral context beyond them – the pagination round-trip contract (pass the full next_page_token back verbatim) and the hard requirement to preserve the full note_url including xsec_token. It stops short of describing rate limits, result caps, or failure modes, so it is strong but not exhaustive.

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?

Front-loaded with purpose, then routing, then parameter pitfalls, then the URL-preservation rule – a sensible order. It is somewhat long and repeats the 'do not truncate/mask the token' warning that already appears in the schema, which costs a little efficiency, but every remaining sentence carries a distinct instruction.

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 the description need not explain returns, and annotations cover the safety profile, so what remains – search scope, routing to alternatives, pagination and URL handling rules – is largely delivered. It is nearly complete, missing only sort_type guidance and any note on result volume or failure behavior.

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 description coverage is already 100%, so the baseline would be 3; the description adds value on top by giving usage examples for note_type (image/video), warning about the publish_time_range naming trap, and stating that page_token must be reused verbatim for the same keyword/sort/type/time chain. The only untapped param is sort_type, which the description never mentions.

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 opens with a specific verb+resource (搜索小红书笔记) and immediately scopes what is included (普通、图文和视频笔记). It explicitly names the sibling it is not (xhs_search_images) and routes detail/comment/speech-text requests to the appropriate other tools, so the agent can distinguish it without opening any schema.

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?

Explicit when-to-use and when-not-to-use rules are given: single-image search goes to xhs_search_images, existing link/note_id goes to the detail tools, comments/replies/speech-to-text go to the URL/ID tools. It also pre-empts common misuse by stating the filter parameter is publish_time_range (not publish_time) and that max_items is not accepted.

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