Skip to main content
Glama
feuerdev
by feuerdev

delete_note

Remove a specific note from Google Keep by providing its unique ID. The tool marks the note for deletion, ensuring efficient note management and cleanup.

Instructions

Delete a note (mark for deletion).

Args:
    note_id (str): The ID of the note to delete
    
Returns:
    str: Success message
    
Raises:
    ValueError: If the note doesn't exist or cannot be modified

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
note_idYes

Implementation Reference

  • The handler function for the 'delete_note' tool. It retrieves the note by ID, checks if it exists and can be modified (via keep-mcp label or UNSAFE_MODE), marks it for deletion, syncs changes, and returns a JSON success message.
    def delete_note(note_id: str) -> str:
        """
        Delete a note (mark for deletion).
        
        Args:
            note_id (str): The ID of the note to delete
            
        Returns:
            str: Success message
            
        Raises:
            ValueError: If the note doesn't exist or cannot be modified
        """
        keep = get_client()
        note = keep.get(note_id)
        
        if not note:
            raise ValueError(f"Note with ID {note_id} not found")
        
        if not can_modify_note(note):
            raise ValueError(f"Note with ID {note_id} cannot be modified (missing keep-mcp label and UNSAFE_MODE is not enabled)")
        
        note.delete()
        keep.sync()  # Ensure deletion is saved to the server
        return json.dumps({"message": f"Note {note_id} marked for deletion"})
Install Server

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/feuerdev/keep-mcp'

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