Context
The openclaw-basic-memory plugin shells out to bm tool commands and parses JSON output. PR #552 adds --format json to read-note, write-note, and recent-activity. A few improvements would make the CLI a more reliable integration surface.
Issues
1. _write_note_json double round-trip
- Currently writes via
mcp_write_note.fn(), then re-resolves the entity via API client to get metadata back
- The MCP tool could return entity metadata (title, permalink, file_path) directly, avoiding the second lookup
- Not blocking, but doubles the work for every write
2. _read_note_json identifier handling
- Uses
memory_url_path(identifier) which may assume the input is a memory URL or permalink
- If a plain title is passed (e.g.
"My Note" instead of "my-note" or "memory://my-note"), does memory_url_path resolve it correctly?
- Plugin users will pass titles, permalinks, and memory URLs interchangeably
3. _recent_activity_json hardcoded pagination
page_size=50 is hardcoded with no CLI passthrough
- Should expose
--page and --page-size options consistent with other commands
4. --project support on recent-activity
5. Consider --format json on build-context
build-context always outputs JSON (no format flag). This is fine and consistent, but adding the flag for symmetry would make the CLI surface more predictable for integrators.
Related
Context
The openclaw-basic-memory plugin shells out to
bm toolcommands and parses JSON output. PR #552 adds--format jsontoread-note,write-note, andrecent-activity. A few improvements would make the CLI a more reliable integration surface.Issues
1.
_write_note_jsondouble round-tripmcp_write_note.fn(), then re-resolves the entity via API client to get metadata back2.
_read_note_jsonidentifier handlingmemory_url_path(identifier)which may assume the input is a memory URL or permalink"My Note"instead of"my-note"or"memory://my-note"), doesmemory_url_pathresolve it correctly?3.
_recent_activity_jsonhardcoded paginationpage_size=50is hardcoded with no CLI passthrough--pageand--page-sizeoptions consistent with other commands4.
--projectsupport onrecent-activity--projecttorecent-activity(good!) — verify it works with--format json+--projecttogether5. Consider
--format jsononbuild-contextbuild-contextalways outputs JSON (no format flag). This is fine and consistent, but adding the flag for symmetry would make the CLI surface more predictable for integrators.Related