Skip to main content
Glama

SocialDataX 小红书 Xiaohongshu XHS RedNote MCP

xhs_search_products

Read-only

搜索小红书商品。用户需要按搜索词查找商品时使用;已有完整 sku_id(包括用户直接提供)时使用商品详情或商品评价工具,已有商品链接或分享文案时使用 xhs_get_product_detail_by_url;支持 page_token 翻页。继续翻页时必须将返回的完整 next_page_token 原样作为 page_token 传回,不得截断、缩写、掩码或用省略号替换中间内容。

Input Schema

NameRequiredDescriptionDefault
keywordYes搜索词,可传商品名、品牌名、品类或商品需求;不要传商品链接、sku_id、spu_id 或 page_token。
page_tokenNo商品搜索分页令牌。首次请求留空;继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回。page_token 只能用于同一商品关键词和调用方的商品搜索链路;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / points / description
      Previous value: -"本次成功调用的积分消耗与调用完成时的账户积分余额。"New value: +"本次成功调用的积分消耗与账户积分余额。"
    • changedOutput schema / properties / points / properties / balance / description
      Previous value: -"本次接口完成时看到的当前积分余额,可为负数。"New value: +"优先返回调用完成时查询到的账户积分余额。查询失败时,回退到本次预扣后的余额快照。余额可为负数。"
  2. 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
  3. Changed18 schema fields changed
    • addedOutput schema / properties / items / items / properties / coupon_price / title
      Added value: +"Coupon Price"
    • addedOutput schema / properties / items / items / properties / description / title
      Added value: +"Description"
    • addedOutput schema / properties / items / items / properties / image_url / title
      Added value: +"Image Url"
    • addedOutput schema / properties / items / items / properties / price / title
      Added value: +"Price"
    • addedOutput schema / properties / items / items / properties / purchasable / title
      Added value: +"Purchasable"
    • addedOutput schema / properties / items / items / properties / sales_text / title
      Added value: +"Sales Text"
    • addedOutput schema / properties / items / items / properties / shop_avatar_url / title
      Added value: +"Shop Avatar Url"
    • addedOutput schema / properties / items / items / properties / shop_id / title
      Added value: +"Shop Id"
    • addedOutput schema / properties / items / items / properties / shop_name / title
      Added value: +"Shop Name"
    • addedOutput schema / properties / items / items / properties / sku_id / title
      Added value: +"Sku Id"
    • addedOutput schema / properties / items / items / properties / sold_count / title
      Added value: +"Sold Count"
    • addedOutput schema / properties / items / items / properties / spu_id / title
      Added value: +"Spu Id"
    • addedOutput schema / properties / items / items / properties / stock_quantity / title
      Added value: +"Stock Quantity"
    • addedOutput schema / properties / items / items / properties / title / title
      Added value: +"Title"
    • addedOutput schema / properties / items / items / title
      Added value: +"ProductSearchItem"
    • 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: +"ProductSearchResult"
  4. Changed14 schema fields changed
    • changedOutput schema / properties / items / items / properties / coupon_price / description
      Previous value: -"商品列表展示券后价格,单位:元;不保证是最终实付价"New value: +"商品列表展示券后/成交价格,单位:元;没有独立券后金额时与 price 相同;不保证是最终实付价"
    • addedOutput schema / properties / items / items / properties / description / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / items / items / properties / description / description
      Previous value: -"商品搜索展示描述;可能与标题重复或包含规格信息,不保证是完整详情描述"New value: +"商品搜索展示描述;可能与标题重复或包含规格信息,不保证是完整详情描述;无法确认时为 null"
    • removedOutput schema / properties / items / items / properties / description / type
      Removed value: -"string"
    • addedOutput schema / properties / items / items / properties / purchasable / anyOf
      Added value: +[
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / items / items / properties / purchasable / description
      Previous value: -"是否可购买"New value: +"是否可购买;无法确认时为 null,不代表不可购买"
    • removedOutput schema / properties / items / items / properties / purchasable / type
      Removed value: -"boolean"
    • changedOutput schema / properties / items / items / properties / sold_count / description
      Previous value: -"已售数量;平台以带“+”的万级文本展示时转换为对应整数下限(如“已售1万+”返回 10000、“已售1.2万+”返回 12000),不是精确销量,须结合 sales_text 解读;缺失或无法解析时为 null,不代表零销量;0 表示明确已售 0。"New value: +"已售数量;平台以带“+”的千级或万级文本展示时转换为对应整数下限(如“90.2k+ sold”返回 90200、“已售1.2万+”返回 12000),不是精确销量,须结合 sales_text 解读;缺失或无法解析时为 null,不代表零销量;0 表示明确已售 0。"
    • addedOutput schema / properties / items / items / properties / spu_id / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / items / items / properties / spu_id / description
      Previous value: -"商品 SPU ID;不要作为商品详情接口入参,也不要作为商品评价接口入参"New value: +"商品 SPU ID;不要作为商品详情接口入参,也不要作为商品评价接口入参;无法确认时为 null"
    • removedOutput schema / properties / items / items / properties / spu_id / type
      Removed value: -"string"
    • addedOutput schema / properties / items / items / properties / stock_quantity / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / items / items / properties / stock_quantity / description
      Previous value: -"库存数量"New value: +"库存数量;无法确认时为 null,不代表库存为 0"
    • removedOutput schema / properties / items / items / properties / stock_quantity / type
      Removed value: -"integer"
  5. Changed7 schema fields changed
    • changedOutput schema / properties / items / items / properties / coupon_price / description
      Previous value: -"券后价格,单位:元"New value: +"商品列表展示券后价格,单位:元;不保证是最终实付价"
    • changedOutput schema / properties / items / items / properties / price / description
      Previous value: -"商品列表展示销售价,单位:元"New value: +"商品列表展示销售价,单位:元;与商品详情的原价口径不同,不保证是最终实付价"
    • addedOutput schema / properties / items / items / properties / sales_text
      Added value: +{
      +  "description": "平台展示的商品销量文本;没有时为空字符串。带“+”的数量表示下限,不是精确销量;结合 sold_count 解读。",
      +  "type": "string"
      +}
    • addedOutput schema / properties / items / items / properties / sold_count / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / items / items / properties / sold_count / description
      Previous value: -"已售数量;平台以带“+”的万级文本展示时转换为对应整数下限(如“已售1万+”返回 10000、“已售1.2万+”返回 12000),无法解析时为 0"New value: +"已售数量;平台以带“+”的万级文本展示时转换为对应整数下限(如“已售1万+”返回 10000、“已售1.2万+”返回 12000),不是精确销量,须结合 sales_text 解读;缺失或无法解析时为 null,不代表零销量;0 表示明确已售 0。"
    • removedOutput schema / properties / items / items / properties / sold_count / type
      Removed value: -"integer"
    • changedOutput schema / properties / items / items / required
      Previous value: -[
      -  "sku_id",
      -  "spu_id",
      -  "title",
      -  "description",
      -  "image_url",
      -  "price",
      -  "coupon_price",
      -  "shop_id",
      -  "shop_name",
      -  "shop_avatar_url",
      -  "stock_quantity",
      -  "purchasable",
      -  "sold_count"
      -]New value: +[
      +  "sku_id",
      +  "spu_id",
      +  "title",
      +  "description",
      +  "image_url",
      +  "price",
      +  "coupon_price",
      +  "shop_id",
      +  "shop_name",
      +  "shop_avatar_url",
      +  "stock_quantity",
      +  "purchasable",
      +  "sold_count",
      +  "sales_text"
      +]
  6. Changed7 schema fields changed
    • removedOutput schema / properties / items / items / properties / seller_avatar_url
      Removed value: -{
      -  "description": "店铺头像链接",
      -  "type": "string"
      -}
    • removedOutput schema / properties / items / items / properties / seller_id
      Removed value: -{
      -  "description": "卖家/店铺 ID",
      -  "type": "string"
      -}
    • removedOutput schema / properties / items / items / properties / seller_name
      Removed value: -{
      -  "description": "店铺名称",
      -  "type": "string"
      -}
    • addedOutput schema / properties / items / items / properties / shop_avatar_url
      Added value: +{
      +  "description": "店铺头像链接",
      +  "type": "string"
      +}
    • addedOutput schema / properties / items / items / properties / shop_id
      Added value: +{
      +  "description": "店铺 ID",
      +  "type": "string"
      +}
    • addedOutput schema / properties / items / items / properties / shop_name
      Added value: +{
      +  "description": "店铺名称",
      +  "type": "string"
      +}
    • changedOutput schema / properties / items / items / required
      Previous value: -[
      -  "sku_id",
      -  "spu_id",
      -  "title",
      -  "description",
      -  "image_url",
      -  "price",
      -  "coupon_price",
      -  "seller_id",
      -  "seller_name",
      -  "seller_avatar_url",
      -  "stock_quantity",
      -  "purchasable",
      -  "sold_count"
      -]New value: +[
      +  "sku_id",
      +  "spu_id",
      +  "title",
      +  "description",
      +  "image_url",
      +  "price",
      +  "coupon_price",
      +  "shop_id",
      +  "shop_name",
      +  "shop_avatar_url",
      +  "stock_quantity",
      +  "purchasable",
      +  "sold_count"
      +]
  7. Changed1 schema field changed
    • changedInput schema / properties / keyword / description
      Previous value: -"小红书商品搜索自然语言关键词;keyword 只传商品名、品牌名、品类或购买/研究需求;不要传商品链接、sku_id、spu_id 或 page_token 作为 keyword。"New value: +"搜索词,可传商品名、品牌名、品类或商品需求;不要传商品链接、sku_id、spu_id 或 page_token。"
  8. Changed4 schema fields changed
    • changedOutput schema / properties / items / items / properties / coupon_price / description
      Previous value: -"券后价格"New value: +"券后价格,单位:元"
    • changedOutput schema / properties / items / items / properties / description / description
      Previous value: -"商品描述"New value: +"商品搜索展示描述;可能与标题重复或包含规格信息,不保证是完整详情描述"
    • changedOutput schema / properties / items / items / properties / price / description
      Previous value: -"商品价格"New value: +"商品列表展示销售价,单位:元"
    • changedOutput schema / properties / items / items / properties / sold_count / description
      Previous value: -"已售数量"New value: +"已售数量;平台以带“+”的万级文本展示时转换为对应整数下限(如“已售1万+”返回 10000、“已售1.2万+”返回 12000),无法解析时为 0"
  9. 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"
      +]
  10. Changed1 schema field changed
    • changedInput schema / properties / keyword / description
      Previous value: -"小红书商品搜索关键词"New value: +"小红书商品搜索自然语言关键词;keyword 只传商品名、品牌名、品类或购买/研究需求;不要传商品链接、sku_id、spu_id 或 page_token 作为 keyword。"
  11. Changed2 schema fields changed
    • changedOutput schema / properties / items / items / properties / sku_id / description
      Previous value: -"商品 SKU ID;可用于商品详情接口"New value: +"商品 SKU ID;可用于商品详情接口,也可用于商品评价接口"
    • changedOutput schema / properties / items / items / properties / spu_id / description
      Previous value: -"商品 SPU ID;不要作为商品详情接口入参"New value: +"商品 SPU ID;不要作为商品详情接口入参,也不要作为商品评价接口入参"
  12. Changed5 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 只能用于同一商品关键词和调用方的商品搜索链路;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。"
    • changedOutput schema / properties / items / items / properties / seller_id / description
      Previous value: -"卖家 ID"New value: +"卖家/店铺 ID"
    • changedOutput schema / properties / items / items / properties / sku_id / description
      Previous value: -"商品 SKU ID"New value: +"商品 SKU ID;可用于商品详情接口"
    • changedOutput schema / properties / items / items / properties / spu_id / description
      Previous value: -"商品 SPU ID"New value: +"商品 SPU ID;不要作为商品详情接口入参"
    • changedOutput schema / properties / next_page_token / description
      Previous value: -"下一页不透明分页令牌;为空表示没有更多结果"New value: +"下一页不透明商品搜索分页令牌;为空表示没有更多结果或当前无法继续翻页。继续翻页时必须将返回的完整 next_page_token 原样作为 page_token 传回。next_page_token 只能用于同一商品关键词和调用方的商品搜索链路;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。"
  13. Added

TDQS

A4.2/5.0
Behavior4/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 the real behavioral contract that matters here — the pagination token must be passed back byte-for-byte, with truncation/masking/ellipsis explicitly forbidden. It does not discuss result volume, rate limits, or whether results are ranked, which keeps it off 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.

Conciseness3/5

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

Purpose and routing are correctly front-loaded, but the long 'must not truncate/abbreviate/mask/elide' clause appears in the description and again verbatim in the page_token schema description — duplicated content that inflates the definition without adding information.

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?

An output schema exists, so return values need not be explained, and the description covers routing, keyword constraints, and pagination correctly for a 2-parameter read tool. Minor gaps remain around result ordering/scope, but nothing needed to invoke the tool correctly is missing.

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%, so both parameters are already fully documented, including the same token-integrity rules and the keyword exclusion list. The description's parameter content largely restates the schema rather than adding new meaning, so the 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 (搜索小红书商品) and immediately separates itself from the three nearest siblings by input type: sku_id goes to the product detail/review tools, a URL or share text goes to xhs_get_product_detail_by_url. An agent can pick the right tool 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?

Gives explicit when-to-use (searching by keyword) plus two concrete when-not-to-use branches naming the alternative tools and the precondition that selects them (have sku_id, have URL/share text). Also covers the continue-pagination case and the exact handoff of next_page_token.

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