Skip to main content
Glama

get_note_by_id

Retrieve a specific note by its ID from the NotePlan MCP Server, enabling direct access to note content within Claude Desktop for streamlined workflow integration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the note to retrieve

Implementation Reference

  • The async handler function for the 'get_note_by_id' MCP tool. It retrieves the note using noteService.getNoteById, throws error if not found, and returns the note as formatted JSON text content.
    async ({ id }) => { const note = noteService.getNoteById(id); if (!note) { throw new Error(`Note not found with id: ${id}`); } return { content: [ { type: 'text', text: JSON.stringify(note, null, 2), }, ], }; }
  • Zod input schema for the tool, defining the required 'id' string parameter.
    { id: z.string().describe('The ID of the note to retrieve'), },
  • src/index.ts:32-33 (registration)
    Registration of the 'get_note_by_id' tool on the MCP server.
    server.tool( 'get_note_by_id',
  • Helper function getNoteById that searches the cached notes list for a note matching the given ID.
    function getNoteById(id: string): Note | null { const notes = getAllNotes(); return notes.find(note => note.id === id) || null; }
  • TypeScript interface defining the structure of Note objects used and returned by the tool.
    interface Note { id: string; title: string; content: string; created: string; modified: string; folder: string; filePath?: string; filename?: string; type?: string; }

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/bscott/noteplan-mcp'

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