update_note
Modify an existing Joplin note by updating its title, content, parent folder, or todo status. Provide the note ID and optional parameters to reflect changes in the Joplin MCP Server.
Instructions
Update an existing note in Joplin.
Args:
args: Note update parameters
note_id: ID of note to update
title: New title (optional)
body: New content (optional)
parent_id: New parent folder ID (optional)
is_todo: New todo status (optional)
Returns:
Dictionary containing the updated note data
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | Yes |
Implementation Reference
- src/mcp/joplin_mcp.py:168-208 (handler)MCP tool handler for 'update_note' that delegates to JoplinAPI.update_note and formats the response.@mcp.tool() async def update_note(args: UpdateNoteInput) -> Dict[str, Any]: """Update an existing note in Joplin. Args: args: Note update parameters note_id: ID of note to update title: New title (optional) body: New content (optional) parent_id: New parent folder ID (optional) is_todo: New todo status (optional) Returns: Dictionary containing the updated note data """ if not api: return {"error": "Joplin API client not initialized"} try: note = api.update_note( note_id=args.note_id, title=args.title, body=args.body, parent_id=args.parent_id, is_todo=args.is_todo ) return { "status": "success", "note": { "id": note.id, "title": note.title, "body": note.body, "created_time": note.created_time.isoformat() if note.created_time else None, "updated_time": note.updated_time.isoformat() if note.updated_time else None, "is_todo": note.is_todo } } except Exception as e: logger.error(f"Error updating note: {e}") return {"error": str(e)}
- src/mcp/joplin_mcp.py:49-55 (schema)Pydantic BaseModel defining the input parameters for the update_note tool.class UpdateNoteInput(BaseModel): """Input parameters for updating a note.""" note_id: str title: Optional[str] = None body: Optional[str] = None parent_id: Optional[str] = None is_todo: Optional[bool] = None
- src/mcp/joplin_mcp.py:168-168 (registration)Registration of the update_note tool using the FastMCP @mcp.tool() decorator.@mcp.tool()
- src/joplin/joplin_api.py:326-361 (helper)Core implementation in JoplinAPI that sends PUT request to Joplin REST API to update the note.def update_note( self, note_id: str, title: str | None = None, body: str | None = None, parent_id: str | None = None, is_todo: bool | None = None ) -> JoplinNote: """Update an existing note. Args: note_id: ID of note to update title: New title body: New content parent_id: New parent folder ID is_todo: New todo status Returns: Updated JoplinNote object """ data = {} if title is not None: data["title"] = title if body is not None: data["body"] = body if parent_id is not None: data["parent_id"] = parent_id if is_todo is not None: data["is_todo"] = is_todo response = self._make_request("PUT", f"notes/{note_id}", json=data) return JoplinNote.from_api_response(response)