feat(integrations): expose note metadata fields in OpenClaw - #1419
Open
lastguru-net wants to merge 2 commits into
Open
feat(integrations): expose note metadata fields in OpenClaw#1419lastguru-net wants to merge 2 commits into
lastguru-net wants to merge 2 commits into
Conversation
Signed-off-by: Dmitry Golubev <lastguru@gmail.com>
Signed-off-by: Dmitry Golubev <lastguru@gmail.com>
beru-ant-king
force-pushed
the
feat/openclaw-note-metadata
branch
from
August 31, 2026 22:18
545052a to
3a0b358
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The OpenClaw plugin exposes
write_noteandedit_notethrough its own TypeBox tool schemas and forwards calls to the Basic Memory MCP server.Those wrappers currently omit several frontmatter parameters already supported by the corresponding MCP tools:
write_note:metadata,tags, andnote_typeedit_note:metadataAs a result, OpenClaw agents cannot use the normal structured-note interface for tasks, schema-backed notes, status fields, priorities, nested metadata, or tags. They must instead embed YAML frontmatter inside
contentor modify frontmatter as text, which bypasses the cleaner MCP parameter contract and makes agent instructions inconsistent across hosts.What changed
write_noteAdded these optional OpenClaw tool parameters:
metadata: arbitrary custom frontmatter fields, including nested objectstags: either an array of strings or a comma-separated stringnote_type: the note type stored in frontmatter, defaulting to the MCP behavior ofnoteThe values are forwarded unchanged to the MCP
write_notecall as:metadatatagsnote_typeThe existing
projectandoverwritebehavior remains unchanged. The new fields are grouped in a typedWriteNoteOptionsobject insideBmClientrather than extending its positional argument list with several unrelated parameters.edit_noteAdded an optional
metadataobject to the OpenClaw tool schema.It is forwarded to the MCP
edit_notecall alongside the selected content operation. This allows callers to update note content and merge custom frontmatter fields in one tool call.The existing append, prepend, find/replace, and section-replacement behavior remains unchanged.
Tool schemas
Both metadata parameters use open TypeBox object schemas with arbitrary additional properties, matching the MCP tools' support for custom and nested frontmatter values.
Optional parameters are omitted from MCP payloads when they are not supplied, preserving the existing call shape for current users.
Documentation
Updated the OpenClaw documentation and agent instructions to match the expanded tool contract:
integrations/openclaw/CLAUDE.mdmetadata,tags, andnote_typeintegrations/openclaw/MEMORY_TASK_FLOW.mdnote_type,tags, andmetadataparametersintegrations/openclaw/README.mdExamples
Create a structured task:
Update content and frontmatter in one call:
Tests
Added regression coverage at both OpenClaw integration layers:
BmClientBmClienttests verify the exact MCP argument names and payloadsVerification
git diff --checkpassed