Bug
build_context responses fail schema validation in Claude Desktop when related_results are present. The fix in 0.18.5 corrected datetime formatting on the primary result and observations, but related_results objects still have structural issues.
Reproduction
- Call
build_context with a URL that has related results (e.g. expand timeframe to 1 year)
- Claude Desktop rejects the response due to schema validation errors
- Works fine when there are no related results (default 7d timeframe returns empty)
Specific issues in related_results objects
- Missing
external_id
- Missing
observation_id
- Missing
category
- Missing
content
- Wrong types on some fields
Expected
related_results should have the same schema fixes applied as the primary entity/observations.
Notes
- Reported by @se1961 in Discord #help
- Claude Desktop is stricter about MCP response schemas than other clients
- Tests may not be covering the
related_results serialization path — worth adding coverage there
Version
basic-memory 0.18.5
Bug
build_contextresponses fail schema validation in Claude Desktop whenrelated_resultsare present. The fix in 0.18.5 corrected datetime formatting on the primary result and observations, butrelated_resultsobjects still have structural issues.Reproduction
build_contextwith a URL that has related results (e.g. expand timeframe to 1 year)Specific issues in
related_resultsobjectsexternal_idobservation_idcategorycontentExpected
related_resultsshould have the same schema fixes applied as the primary entity/observations.Notes
related_resultsserialization path — worth adding coverage thereVersion
basic-memory 0.18.5