Skip to main content
Glama

list_user_notes

Retrieve all notes owned by the user using the HackMD API. This tool helps organize and manage personal notes efficiently through the MCP server.

Instructions

List all notes owned by the user

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": {}, "type": "object" }

Implementation Reference

  • The handler function that implements the list_user_notes tool. It fetches the user's notes using the HackMD API client.getNoteList(), stringifies them as JSON, and returns as text content block. Handles errors by returning an error message.
    async () => { try { const notes = await client.getNoteList(); return { content: [ { type: "text", text: JSON.stringify(notes, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } },
  • Registers the list_user_notes tool with the MCP server, specifying name, description, empty input schema, output hints (read-only, open-world), and attaches the handler function.
    server.tool( "list_user_notes", "List all notes owned by the user", {}, { title: "Get a list of notes in the user's workspace", readOnlyHint: true, openWorldHint: true, }, async () => { try { const notes = await client.getNoteList(); return { content: [ { type: "text", text: JSON.stringify(notes, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } }, );
  • tools/index.ts:21-21 (registration)
    Top-level call to register all user notes tools, including list_user_notes, within the registerAllTools function.
    registerUserNotesApiTools(server, client);

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/yuna0x0/hackmd-mcp'

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