Skip to main content
Glama
ethancod1ng

RedNote MCP Server

by ethancod1ng

rednote_get_note

Retrieve detailed content from Xiaohongshu (Little Red Book) notes by providing a note ID, with optional comment inclusion for comprehensive analysis.

Instructions

获取笔记详情

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
note_idYes笔记ID
include_commentsNo是否包含评论

Implementation Reference

  • The main handler function for the 'rednote_get_note' tool in ContentTools class. Validates input parameters, calls the RedNote API to fetch note details, formats the response as MCP content, and handles errors.
    async getNote(params: any) {
      try {
        validateNotEmpty(params.note_id, 'note_id');
        validateString(params.note_id, 'note_id');
    
        logger.info('Executing get note tool', { noteId: params.note_id });
        
        const result = await this.api.getNote(params.note_id, params.include_comments || false);
        
        return {
          content: [{
            type: 'text',
            text: JSON.stringify(result, null, 2)
          }]
        };
      } catch (error) {
        logger.error('Error in getNote tool:', error);
        return {
          content: [{
            type: 'text',
            text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}`
          }],
          isError: true
        };
      }
    }
  • Tool definition in TOOL_DEFINITIONS including name, description, and input schema for validation.
    rednote_get_note: {
      name: 'rednote_get_note',
      description: '获取笔记详情',
      inputSchema: {
        type: 'object',
        properties: {
          note_id: {
            type: 'string',
            description: '笔记ID'
          },
          include_comments: {
            type: 'boolean',
            description: '是否包含评论',
            default: false
          }
        },
        required: ['note_id']
      }
    },
  • src/server.ts:61-62 (registration)
    Dispatches calls to the 'rednote_get_note' tool to the ContentTools.getNote handler within the MCP CallToolRequestSchema handler.
    case 'rednote_get_note':
      return await this.contentTools.getNote(params);
  • RedNoteApi.getNote method called by the tool handler; provides the core data fetching logic (mock implementation) for note details.
    async getNote(noteId: string, includeComments: boolean = false): Promise<RedNoteNote> {
      logger.info('Getting note', { noteId, includeComments });
      
      try {
        const mockNote = this.generateMockNote(noteId);
        return mockNote;
      } catch (error) {
        logger.error('Error getting note:', error);
        throw new Error(`Failed to get note ${noteId}: ${error}`);
      }
    }
Behavior2/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. '获取笔记详情' implies a read-only operation, but it doesn't specify authentication requirements, rate limits, error conditions, or what '详情' (details) encompasses. For a tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves beyond its basic function.

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

Conciseness5/5

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

The description is extremely concise—a single phrase ('获取笔记详情') that directly states the tool's purpose. There is zero wasted language, and it's front-loaded with the essential action. Every word earns its place, making it efficient for quick comprehension.

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 lack of annotations and output schema, the description is incomplete for effective tool use. It doesn't explain what '详情' includes (e.g., note content, metadata, attachments), how errors are handled, or what the return format looks like. For a retrieval tool with no structured output documentation, the description should provide more context about the expected behavior and results.

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-specific information beyond what the schema already provides (100% coverage). The schema fully documents both parameters: 'note_id' as the required note identifier and 'include_comments' as an optional boolean flag. Since the schema does all the heavy lifting, the baseline score of 3 is appropriate—the description doesn't compensate but doesn't need to given complete schema coverage.

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

Purpose3/5

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

The description '获取笔记详情' (Get note details) states a clear verb ('获取' - get) and resource ('笔记详情' - note details), establishing the basic purpose. However, it doesn't differentiate this tool from its sibling 'rednote_get_user_notes' (which likely lists multiple notes) or 'rednote_search_notes' (which searches notes), leaving the scope vague. The description is functional but lacks specificity about what distinguishes this single-note retrieval from other note-related operations.

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

Usage Guidelines2/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. It doesn't mention that this is for retrieving a specific note by ID (as opposed to 'rednote_get_user_notes' for listing notes or 'rednote_search_notes' for searching). There are no explicit when/when-not instructions, prerequisites, or named alternatives. The agent must infer usage from the parameter names 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