Skip to main content
Glama
ethancod1ng

RedNote MCP Server

by ethancod1ng

rednote_search_notes

Search Xiaohongshu (Little Red Book) notes, videos, or all content types by keyword, with options to sort results by relevance, popularity, or recency, and set a limit on returned items.

Instructions

搜索小红书笔记

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYes搜索关键词
limitNo返回数量限制
sortNo排序方式relevant
typeNo内容类型all

Implementation Reference

  • The primary handler function for the 'rednote_search_notes' MCP tool. It validates input parameters, prepares search params, calls the RedNote API, and returns the result as JSON text content or an error.
    async searchNotes(params: any) { try { validateSearchParams(params); const searchParams = { keyword: params.keyword, type: params.type || 'all', sort: params.sort || 'relevant', limit: params.limit || 20 }; logger.info('Executing search notes tool', { params: searchParams }); const result = await this.api.searchNotes(searchParams); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { logger.error('Error in searchNotes tool:', error); return { content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }], isError: true }; } }
  • The input schema definition for the 'rednote_search_notes' tool, including properties, types, descriptions, defaults, and required fields.
    rednote_search_notes: { name: 'rednote_search_notes', description: '搜索小红书笔记', inputSchema: { type: 'object', properties: { keyword: { type: 'string', description: '搜索关键词' }, type: { type: 'string', enum: ['note', 'video', 'all'], description: '内容类型', default: 'all' }, sort: { type: 'string', enum: ['latest', 'popular', 'relevant'], description: '排序方式', default: 'relevant' }, limit: { type: 'number', description: '返回数量限制', default: 20, minimum: 1, maximum: 100 } }, required: ['keyword'] } },
  • src/server.ts:58-59 (registration)
    The switch case registration in the MCP server request handler that routes calls to the 'rednote_search_notes' tool to the SearchTools.searchNotes method.
    case 'rednote_search_notes': return await this.searchTools.searchNotes(params);

Other Tools

Related 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/ethancod1ng/rednote-mcp-server'

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