Files
basicmachines-co-basic-memory/src/basic_memory
claude[bot] 29b9d755e2 fix(mcp): restore overwrite param schema for external MCP clients (#818)
AliasChoices on `overwrite: bool | None` in write_note caused FastMCP to
generate a broken JSON schema where external clients (e.g. Claude Code)
saw the parameter as type null-only. The boolean value was silently
dropped, so `overwrite=True` arrived as None at the function body.

Revert overwrite to a plain `bool | None = None` parameter. FastMCP now
generates the correct `anyOf: [boolean, null]` schema, and external
clients can send `overwrite=true` as intended.

The `directory` alias (folder/dir/path) is unaffected — AliasChoices on
a required `str` parameter does not exhibit this schema generation issue.

Add regression test: test_write_note_overwrite_canonical_via_mcp verifies
that overwrite=True reaches the function body through the MCP protocol.

Co-authored-by: Paul Hernandez <phernandez@users.noreply.github.com>
Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
2026-05-14 01:14:37 +00:00
..