Feature: edit_note append/prepend should create file if not found
Current Behavior
edit_note(operation=append) on a nonexistent note returns an error (Entity not found). The MCP result doesn't set isError: true — it returns a malformed success response missing structuredContent, causing downstream clients to throw invalid edit_note payload.
Desired Behavior
edit_note should just work:
| Operation |
Note Exists |
Behavior |
fileCreated |
append |
yes |
Append content to end |
false |
append |
no |
Create file with content |
true |
prepend |
yes |
Prepend content to start |
false |
prepend |
no |
Create file with content |
true |
find_replace |
no |
Error (can't replace in nonexistent file) |
n/a |
replace_section |
no |
Error (can't replace section that doesn't exist) |
n/a |
Response Shape (always)
{
"title": "conversations-2026-02-26",
"permalink": "claw/conversations/conversations-2026-02-26",
"file_path": "memory/conversations/conversations-2026-02-26.md",
"fileCreated": true
}
No isError for the create-on-miss case. The caller asked to append — the tool appends. Whether the file was just created is metadata, not an error.
Motivation
The openclaw-basic-memory plugin's conversation auto-capture calls edit_note(append) to build up daily conversation notes. On the first message of the day, the note doesn't exist. Currently this silently fails every time (100+ failures/day logged in BM), and the fallback logic in the plugin was broken because the error format was unexpected.
With this change, the plugin's indexConversation becomes one line:
await this.editNote(title, 'append', entry)
Also applies to MCP tool callers (Claude, Cursor, etc.)
Any AI using edit_note to incrementally build a note shouldn't need to check if the note exists first. append to a nonexistent file should just work — same as echo 'hello' >> newfile.txt in a shell.
Feature: edit_note append/prepend should create file if not found
Current Behavior
edit_note(operation=append)on a nonexistent note returns an error (Entity not found). The MCP result doesn't setisError: true— it returns a malformed success response missingstructuredContent, causing downstream clients to throwinvalid edit_note payload.Desired Behavior
edit_noteshould just work:fileCreatedappendfalseappendtrueprependfalseprependtruefind_replacereplace_sectionResponse Shape (always)
{ "title": "conversations-2026-02-26", "permalink": "claw/conversations/conversations-2026-02-26", "file_path": "memory/conversations/conversations-2026-02-26.md", "fileCreated": true }No
isErrorfor the create-on-miss case. The caller asked to append — the tool appends. Whether the file was just created is metadata, not an error.Motivation
The openclaw-basic-memory plugin's conversation auto-capture calls
edit_note(append)to build up daily conversation notes. On the first message of the day, the note doesn't exist. Currently this silently fails every time (100+ failures/day logged in BM), and the fallback logic in the plugin was broken because the error format was unexpected.With this change, the plugin's
indexConversationbecomes one line:Also applies to MCP tool callers (Claude, Cursor, etc.)
Any AI using
edit_noteto incrementally build a note shouldn't need to check if the note exists first.appendto a nonexistent file should just work — same asecho 'hello' >> newfile.txtin a shell.