delete_note
Remove a note file from Nextcloud Notes by specifying its filename and optional category, enabling users to delete unwanted notes and manage their note collection.
Instructions
Delete a note file inside Notes.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| category | No |
Implementation Reference
- nextcloud_notes_mcp/server.py:164-174 (handler)The main handler function for the 'delete_note' tool, registered via @mcp.tool() decorator. It constructs the remote path and uses the WebDAV client to delete the note file.@mcp.tool() def delete_note(filename: str, category: str | None = None) -> str: """ Delete a note file inside Notes. """ full_path = f"Notes/{category}/{filename}" if category else f"Notes/{filename}" try: client.clean(full_path) except Exception as e: return f"Failed to delete note: {str(e)}" return f"Note deleted successfully: {full_path}"