Skip to main content
Glama
ethancod1ng

RedNote MCP Server

by ethancod1ng

rednote_get_trending_topics

Discover trending topics from Xiaohongshu (Little Red Book) by category to identify popular content and discussions for analysis or inspiration.

Instructions

获取热门话题

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNo分类
limitNo数量限制

Implementation Reference

  • The main handler function for the 'rednote_get_trending_topics' tool. It validates optional limit parameter, logs the execution, calls the RedNoteApi to fetch trending topics, and returns the JSON-formatted result or error.
    async getTrendingTopics(params: any) { try { if (params.limit) { validateNumber(params.limit, 'limit', 1, 100); } logger.info('Executing get trending topics tool', { category: params.category, limit: params.limit }); const result = await this.api.getTrendingTopics(params.category, params.limit || 20); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { logger.error('Error in getTrendingTopics tool:', error); return { content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }], isError: true }; } }
  • The tool definition including name, description, and input schema for 'rednote_get_trending_topics' used for listing tools and validation.
    rednote_get_trending_topics: { name: 'rednote_get_trending_topics', description: '获取热门话题', inputSchema: { type: 'object', properties: { category: { type: 'string', description: '分类' }, limit: { type: 'number', description: '数量限制', default: 20, minimum: 1, maximum: 100 } } } },
  • src/server.ts:67-68 (registration)
    The switch case in the CallToolRequest handler that registers and dispatches the 'rednote_get_trending_topics' tool call to the ContentTools handler.
    case 'rednote_get_trending_topics': return await this.contentTools.getTrendingTopics(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