Skip to main content
Glama

delete_note

Remove a specific note from HackMD by providing its unique note ID using the MCP server's functionality.

Instructions

Delete a note

Input Schema

NameRequiredDescriptionDefault
noteIdYesNote ID

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "noteId": { "description": "Note ID", "type": "string" } }, "required": [ "noteId" ], "type": "object" }

Implementation Reference

  • The handler function that executes the delete_note tool. It calls client.deleteNote(noteId) and formats a success or error response.
    async ({ noteId }) => { try { const result = await client.deleteNote(noteId); return { content: [ { type: "text", text: `Note ${noteId} deleted successfully:\n${JSON.stringify(result, null, 2)}`, }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } },
  • Zod input schema for the delete_note tool, requiring a noteId string parameter.
    { noteId: z.string().describe("Note ID"), },
  • Full registration of the delete_note tool using server.tool(), including name, description, schema, hints, and inline handler.
    server.tool( "delete_note", "Delete a note", { noteId: z.string().describe("Note ID"), }, { title: "Delete a note", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true, }, async ({ noteId }) => { try { const result = await client.deleteNote(noteId); return { content: [ { type: "text", text: `Note ${noteId} deleted successfully:\n${JSON.stringify(result, null, 2)}`, }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } }, );

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