mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
29b9d755e2
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>