Skip to content

Bug: edit_note MCP tool rejects payload with null/undefined optional fields #606

@bm-clawd

Description

@bm-clawd

Problem

edit_note via MCP rejects payloads that include optional fields set to null or undefined. For example, an append operation that includes find_text: null and section: null fails with an invalid payload error.

Reproduction

This call fails:

{
  "identifier": "conversations-2026-02-25",
  "operation": "append",
  "content": "### 10:00\n...",
  "find_text": null,
  "section": null,
  "expected_replacements": null,
  "output_format": "json"
}

This call succeeds:

{
  "identifier": "conversations-2026-02-25",
  "operation": "append",
  "content": "### 10:00\n...",
  "output_format": "json"
}

Impact

  • Breaks the openclaw-basic-memory plugin's auto-capture hook (indexConversationeditNote → append to daily conversation note)
  • Gateway error log: basic-memory: conversation append failed — invalid edit_note payload
  • Worked in previous BM versions — likely a regression from stricter MCP input validation

Workaround

Plugin-side fix applied in openclaw-basic-memory@8caaf86: strip undefined optional fields before sending. But BM should also handle this gracefully — null/undefined optional fields should be ignored, not rejected.

Expected Behavior

Optional fields (find_text, section, expected_replacements) that are null or absent should be silently ignored for operations that don't use them (append, prepend).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions