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);
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers none. It doesn't describe what 'trending' means (e.g., based on views, likes, recency), whether this is a read-only operation (implied but not stated), what the output format might be, or any rate limits or authentication requirements. The description fails to add any behavioral context beyond the basic purpose.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

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

While concise with just four characters, this is under-specification rather than effective brevity. The description is too minimal to be helpful - it lacks necessary context and structure. A single phrase doesn't earn its place when it fails to provide adequate guidance for tool selection and use.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's apparent complexity (fetching trending topics with filtering parameters), no annotations, and no output schema, the description is incomplete. It doesn't explain what 'trending topics' are, how they're determined, what the response contains, or how to interpret results. For a tool with parameters and no structured output documentation, this minimal description leaves critical gaps.

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?

The description adds no parameter information beyond what the schema provides. However, with 100% schema description coverage, the baseline is 3. The schema documents both parameters ('category' and 'limit') with descriptions, default values, and constraints, so the description doesn't need to compensate but also doesn't add value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '获取热门话题' (Get trending topics) states a basic purpose but is vague and tautological - it essentially restates the tool name 'rednote_get_trending_topics' in Chinese. It doesn't specify what 'trending topics' means in this context (e.g., trending notes, discussions, or content), nor does it distinguish this tool from sibling tools like 'rednote_search_notes' or 'rednote_analyze_content'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of when this tool is appropriate (e.g., for discovering popular content vs. searching for specific notes), what context it serves, or any prerequisites. Users must infer usage from the name alone.

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

Install Server

Other 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