Skip to main content
Glama

delete_note

Remove a specific note permanently from Flint Note's vault. Requires a note identifier and optional explicit confirmation to ensure accurate deletion.

Instructions

Delete an existing note permanently

Input Schema

NameRequiredDescriptionDefault
confirmNoExplicit confirmation required for deletion
identifierYesNote identifier (type/filename format)
vault_idNoOptional vault ID to operate on. If not provided, uses the current active vault.

Input Schema (JSON Schema)

{ "properties": { "confirm": { "default": false, "description": "Explicit confirmation required for deletion", "type": "boolean" }, "identifier": { "description": "Note identifier (type/filename format)", "type": "string" }, "vault_id": { "description": "Optional vault ID to operate on. If not provided, uses the current active vault.", "type": "string" } }, "required": [ "identifier" ], "type": "object" }

Implementation Reference

  • The main handler function for the 'delete_note' MCP tool. Validates input, resolves vault context, calls the core noteManager.deleteNote method, and returns a formatted response.
    handleDeleteNote = async (args: DeleteNoteArgs) => { try { // Validate arguments validateToolArgs('delete_note', args); const { noteManager } = await this.resolveVaultContext(args.vault_id); const result = await noteManager.deleteNote(args.identifier, args.confirm); return { content: [ { type: 'text', text: JSON.stringify( { success: true, message: `Note '${args.identifier}' deleted successfully`, result }, null, 2 ) } ] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : 'Unknown error'; return { content: [ { type: 'text', text: JSON.stringify( { success: false, error: errorMessage }, null, 2 ) } ], isError: true }; } };
  • JSON schema definition for the 'delete_note' tool inputs, including identifier, confirm flag, and optional vault_id.
    name: 'delete_note', description: 'Delete a specific note', inputSchema: { type: 'object', properties: { identifier: { type: 'string', description: 'Note identifier in type/filename format' }, confirm: { type: 'boolean', description: 'Confirmation flag to prevent accidental deletion', default: false }, vault_id: { type: 'string', description: 'Optional vault ID to operate on. If not provided, uses the current active vault.' } }, required: ['identifier', 'confirm'] }
  • Registration of the 'delete_note' tool handler in the MCP server's CallToolRequestSchema switch statement.
    case 'delete_note': return await this.noteHandlers.handleDeleteNote( args as unknown as DeleteNoteArgs );
  • TypeScript interface defining the arguments for the delete_note tool handler.
    export interface DeleteNoteArgs { identifier: string; confirm?: boolean; vault_id?: string; }
  • Validation rules for 'delete_note' tool arguments, including format check for identifier.
    delete_note: [ { field: 'identifier', required: true, type: 'string', allowEmpty: false, customValidator: (value: any) => { if (!value.includes('/')) { return 'identifier must be in format "type/filename"'; } return null; } }, { field: 'confirm', required: false, type: 'boolean' }, { field: 'vault_id', required: false, type: 'string', allowEmpty: false } ],

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/disnet/flint-note'

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