Bug Description (From Claude)
The write_note function is failing to update existing notes in the Basic Memory system, producing errors both when attempting to write without a specified folder and when attempting to update files that already exist.
Steps To Reproduce
- Check current date/time using the
get_time function (unrelated, part of custom instructions to get the time so Claude can accurately understand relative times like, "Look at yesterday's note," etc.)
- Retrieve an existing note using
read_note with its permalink (e.g., "periodic-notes-daily-2025-04-18")
- Attempt to update the note using
write_note with the same title
- Observe error indicating the file already exists
Expected Behavior
The write_note function should be able to update existing notes, either by overwriting them entirely or by merging changes with the existing content. This would allow for programmatic updates to daily notes and other frequently modified documents.
Actual Behavior
Two distinct errors were observed:
- When attempting to write without specifying folder:
Error executing tool write_note: 1 validation error for write_noteArguments
folder
Field required [type=missing, input_value={'title': '2025-04-18', '...llows [[2025-04-17]]\n'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.11/v/missing
- When attempting to write with folder specified:
Error executing tool write_note: file for entity Periodic Notes/Daily/2025-04-17 already exists: Periodic Notes\Daily\2025-04-17.md
Environment
- OS: Windows 11 Insider
- Python version: 3.13.2
- Basic Memory version: 0.12.2
- Installation method: uv 0.6.10
- Claude Desktop version: 0.9.2
Additional Context
- This issue affects core functionality for assistants designed to update daily notes or maintain knowledge repositories
- The error seems to indicate that the
write_note function is designed to create new files only, not update existing ones
- The folder parameter appears to be required even when the permalink is specified, which creates redundancy
- There may be a need for an
update_note function or a parameter for write_note that allows overwriting existing files
Possible Solution
Three potential solutions:
- Modify the
write_note function to accept an overwrite boolean parameter that, when set to true, allows updating existing files
- Create a dedicated
update_note function specifically for modifying existing notes
- Implement a "merge" capability that would allow selective updating of note sections while preserving other content
As a temporary workaround, users could:
- Read the existing note with
read_note
- Create a new note with a slightly modified title or in a different folder
- Manually copy the content back to the original location
This issue significantly impacts the usability of Basic Memory for maintaining living documents like daily notes, where regular updates are essential.
Bug Description (From Claude)
The
write_notefunction is failing to update existing notes in the Basic Memory system, producing errors both when attempting to write without a specified folder and when attempting to update files that already exist.Steps To Reproduce
get_timefunction (unrelated, part of custom instructions to get the time so Claude can accurately understand relative times like, "Look at yesterday's note," etc.)read_notewith its permalink (e.g., "periodic-notes-daily-2025-04-18")write_notewith the same titleExpected Behavior
The
write_notefunction should be able to update existing notes, either by overwriting them entirely or by merging changes with the existing content. This would allow for programmatic updates to daily notes and other frequently modified documents.Actual Behavior
Two distinct errors were observed:
Environment
Additional Context
write_notefunction is designed to create new files only, not update existing onesupdate_notefunction or a parameter forwrite_notethat allows overwriting existing filesPossible Solution
Three potential solutions:
write_notefunction to accept anoverwriteboolean parameter that, when set totrue, allows updating existing filesupdate_notefunction specifically for modifying existing notesAs a temporary workaround, users could:
read_noteThis issue significantly impacts the usability of Basic Memory for maintaining living documents like daily notes, where regular updates are essential.