delete_note
Remove a note from Joplin using the note ID. Optionally delete permanently for complete removal. Returns operation status for confirmation.
Instructions
Delete a note from Joplin.
Args:
note_id: ID of note to delete
permanent: If True, permanently delete the note
Returns:
Dictionary containing the operation status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note_id | Yes | ||
| permanent | No |
Implementation Reference
- src/mcp/joplin_mcp.py:209-231 (handler)MCP tool handler for 'delete_note', decorated with @mcp.tool() which registers the tool. Executes the deletion by calling JoplinAPI.delete_note and returns status.@mcp.tool() async def delete_note(note_id: str, permanent: bool = False) -> Dict[str, Any]: """Delete a note from Joplin. Args: note_id: ID of note to delete permanent: If True, permanently delete the note Returns: Dictionary containing the operation status """ if not api: return {"error": "Joplin API client not initialized"} try: api.delete_note(note_id, permanent=permanent) return { "status": "success", "message": f"Note {note_id} {'permanently ' if permanent else ''}deleted" } except Exception as e: logger.error(f"Error deleting note: {e}") return {"error": str(e)}
- src/joplin/joplin_api.py:363-374 (helper)JoplinAPI helper method that performs the actual HTTP DELETE request to the Joplin server to delete the specified note, optionally permanently.def delete_note(self, note_id: str, permanent: bool = False) -> None: """Delete a note. Args: note_id: ID of note to delete permanent: If True, permanently delete the note """ endpoint = f"notes/{note_id}" if permanent: endpoint += "?permanent=1" self._make_request("DELETE", endpoint)