Skip to main content
Glama
jordanburke

joplin-mcp-server

read_note

Retrieve the full content of a specific note by providing its unique ID, enabling quick access to detailed information stored in the Joplin MCP Server.

Instructions

Read the full content of a specific note

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
note_idYesID of the note to read

Implementation Reference

  • Core handler logic in ReadNote.call(): validates note ID, fetches note and parent notebook details via Joplin API, formats metadata, todo status, timestamps, body content, and helpful commands.
    async call(noteId: string): Promise<string> {
      const validationError = this.validateId(noteId, "note")
      if (validationError) {
        return validationError
      }
    
      try {
        // Get the note details with all relevant fields
        const note = await this.apiClient.get<JoplinNote>(`/notes/${noteId}`, {
          query: {
            fields: "id,title,body,parent_id,created_time,updated_time,is_todo,todo_completed,todo_due",
          },
        })
    
        // Validate note response
        if (!note || typeof note !== "object" || !note.id) {
          return `Error: Unexpected response format from Joplin API when fetching note`
        }
    
        // Get the notebook info to show where this note is located
        let notebookInfo = "Unknown notebook"
        if (note.parent_id) {
          try {
            const notebook = await this.apiClient.get<JoplinFolder>(`/folders/${note.parent_id}`, {
              query: { fields: "id,title" },
            })
            if (notebook && notebook.title) {
              notebookInfo = `"${notebook.title}" (notebook_id: "${note.parent_id}")`
            }
          } catch (err: unknown) {
            process.stderr.write(`Error fetching notebook info: ${err}\n`)
            // Continue even if we can't get the notebook info
          }
        }
    
        // Format the note content
        const resultLines: string[] = []
    
        // Add note header with metadata
        resultLines.push(`# Note: "${note.title}"`)
        resultLines.push(`Note ID: ${note.id}`)
        resultLines.push(`Notebook: ${notebookInfo}`)
    
        // Add todo status if applicable
        if (note.is_todo) {
          const status = note.todo_completed ? "Completed" : "Not completed"
          resultLines.push(`Status: ${status}`)
    
          if (note.todo_due) {
            const dueDate = this.formatDate(note.todo_due)
            resultLines.push(`Due: ${dueDate}`)
          }
        }
    
        // Add timestamps
        const createdDate = this.formatDate(note.created_time)
        const updatedDate = this.formatDate(note.updated_time)
        resultLines.push(`Created: ${createdDate}`)
        resultLines.push(`Updated: ${updatedDate}`)
    
        // Add a separator before the note content
        resultLines.push("\n---\n")
    
        // Add the note body
        if (note.body) {
          resultLines.push(note.body)
        } else {
          resultLines.push("(This note has no content)")
        }
    
        // Add a footer with helpful commands
        resultLines.push("\n---\n")
        resultLines.push("Related commands:")
        resultLines.push(`- To view the notebook containing this note: read_notebook notebook_id="${note.parent_id}"`)
        resultLines.push('- To search for more notes: search_notes query="your search term"')
    
        return resultLines.join("\n")
      } catch (error: any) {
        if (error.response && error.response.status === 404) {
          return `Note with ID "${noteId}" not found.\n\nThis might happen if:\n1. The ID is incorrect\n2. You're using a notebook ID instead of a note ID\n3. The note has been deleted\n\nUse search_notes to find notes and their IDs.`
        }
        return (
          this.formatError(error, "reading note") +
          `\n\nMake sure you're using a valid note ID.\nUse search_notes to find notes and their IDs.`
        )
      }
    }
  • Registers the read_note tool with FastMCP server, defining name, description, input schema (note_id), and execution delegating to manager.readNote.
    // Add read_note tool
    server.addTool({
      name: "read_note",
      description: "Read the full content of a specific note",
      parameters: z.object({
        note_id: z.string().describe("ID of the note to read"),
      }),
      execute: async (args) => {
        return await manager.readNote(args.note_id)
      },
    })
  • Zod schema for tool input: requires note_id as string.
    parameters: z.object({
      note_id: z.string().describe("ID of the note to read"),
    }),
  • JoplinServerManager.readNote(): delegates execution to the ReadNote tool instance.
    async readNote(noteId: string): Promise<string> {
      return await this.tools.readNote.call(noteId)
    }
  • Instantiates ReadNote tool with API client in JoplinServerManager constructor.
    readNote: new ReadNote(this.apiClient),
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a read operation, but doesn't mention authentication requirements, rate limits, error conditions, or what 'full content' includes (e.g., metadata, formatting). This leaves significant gaps for a tool that presumably accesses user data.

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 a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for a simple read operation and front-loads the essential information.

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?

For a data access tool with no annotations and no output schema, the description is insufficient. It doesn't explain what format the content returns in, whether it includes metadata, or what happens with invalid IDs. Given the context of sibling tools that handle multiple notes and notebooks, more guidance is needed.

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 schema description coverage is 100%, with the single parameter 'note_id' clearly documented in the schema. The description adds no additional parameter information beyond what the schema already provides, so the baseline score of 3 is appropriate.

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

Purpose4/5

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

The description clearly states the action ('Read the full content') and resource ('a specific note'), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'read_multinote' or 'read_notebook', which prevents a perfect score.

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 like 'read_multinote' or 'read_notebook'. It doesn't mention prerequisites, constraints, or typical use cases, leaving the agent to infer usage from context 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

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/jordanburke/joplin-mcp-server'

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