Skip to main content
Glama

delete_notes

Remove specified notes from the Anki MCP server by providing an array of note IDs. Simplify note management and declutter your Anki database efficiently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteIdsYesArray of note IDs to delete

Implementation Reference

  • The complete registration of the 'delete_notes' MCP tool, including schema validation (noteIds: array of numbers) and inline handler that calls ankiClient.note.deleteNotes and returns a success message.
    server.tool( 'delete_notes', { noteIds: z.array(z.number()).describe('Array of note IDs to delete'), }, async ({ noteIds }) => { try { await ankiClient.note.deleteNotes({ notes: noteIds }); return { content: [ { type: 'text', text: `Successfully deleted ${noteIds.length} notes: [${noteIds.join(', ')}]`, }, ], }; } catch (error) { throw new Error( `Failed to delete notes: ${error instanceof Error ? error.message : String(error)}` ); } } );
  • The handler function for delete_notes tool: takes noteIds, deletes them via ankiClient.note.deleteNotes, returns formatted success text or throws error.
    async ({ noteIds }) => { try { await ankiClient.note.deleteNotes({ notes: noteIds }); return { content: [ { type: 'text', text: `Successfully deleted ${noteIds.length} notes: [${noteIds.join(', ')}]`, }, ], }; } catch (error) { throw new Error( `Failed to delete notes: ${error instanceof Error ? error.message : String(error)}` ); } }
  • Input schema for delete_notes tool using Zod: requires noteIds as array of numbers.
    { noteIds: z.array(z.number()).describe('Array of note IDs to delete'), },

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/arielbk/anki-mcp'

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