Skip to main content
Glama
ethancod1ng

RedNote MCP Server

by ethancod1ng

rednote_get_user_notes

Retrieve user notes from Xiaohongshu (Little Red Book) by specifying a user ID, with options for pagination and result limits.

Instructions

获取用户笔记

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idYes用户ID
limitNo数量限制
cursorNo分页游标

Implementation Reference

  • The primary handler for the 'rednote_get_user_notes' tool. Validates input parameters, invokes the RedNote API, formats the response as MCP content, and handles errors.
    async getUserNotes(params: any) { try { validateNotEmpty(params.user_id, 'user_id'); validateString(params.user_id, 'user_id'); if (params.limit) { validateNumber(params.limit, 'limit', 1, 100); } logger.info('Executing get user notes tool', { userId: params.user_id, limit: params.limit, cursor: params.cursor }); const result = await this.api.getUserNotes( params.user_id, params.limit || 20, params.cursor ); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { logger.error('Error in getUserNotes tool:', error); return { content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }], isError: true }; } }
  • The input schema and metadata definition for the 'rednote_get_user_notes' tool, used for tool listing and validation.
    rednote_get_user_notes: { name: 'rednote_get_user_notes', description: '获取用户笔记', inputSchema: { type: 'object', properties: { user_id: { type: 'string', description: '用户ID' }, limit: { type: 'number', description: '数量限制', default: 20, minimum: 1, maximum: 100 }, cursor: { type: 'string', description: '分页游标' } }, required: ['user_id'] } },
  • src/server.ts:64-65 (registration)
    The switch case in the tool request handler that routes calls to the 'rednote_get_user_notes' tool to its implementation.
    case 'rednote_get_user_notes': return await this.contentTools.getUserNotes(params);

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