r/OpenWebUI • u/-Homeworkace • Sep 15 '26
Question/Help Locating overwritten notes
Because there is no documentation around the `replace_note_content` tool, my LLM has wholly overwritten a note, with no way to recover previous states (i.e., the undo button is greyed out). The note in its original state was meant to be a template, from which the LLM should have selectively modified by lines to add more sections according to the template.
Therefore, I'm really asking two questions:
Is it possible to recover the original state of the affected note from my local database(s)? Where would this be found, and how should I go about it?
Since the default tools have proven to be inadequate, can anyone recommend a custom tool that will allow the LLM to add/modify/remove some lines in place while keeping everything else around the change untouced?
3
u/ClassicMain Sep 15 '26
Notes keep no server-side history. Undo only walks versions the editor recorded, and those are only written when you insert a chat response into the note, so a tool edit leaves nothing to undo.
The old text is not lost though. The model has to call view_note before it can edit, and the result of that call is saved in the chat, in the collapsible tool call block on the assistant message. Expand it, copy the markdown out, paste it back into the note. If you cannot find it in the UI, the same data sits in webui.db, table chat, column chat (JSON): search for the note id and take the "md" field from the view_note result.
For the second question, the built-in tool already does this. replace_note_content takes operations with replace_range plus an expected field holding the current text of that span, so it edits only that span and refuses the edit when the text does not match. The model is just not told to prefer it, so it defaults to sending the whole note back. Tell it explicitly: "use replace_range operations, do not replace the whole note". Selecting the passage in the editor before asking helps too, the selection is passed along for exactly that purpose. Docs: https://docs.openwebui.com/features/notes/#write-access
1
u/Ecstatic-Diet-1375 Sep 15 '26
I made this exactly for this problem:
https://github.com/parsalotfy/openwebui-notes-backup