basic-memory icon indicating copy to clipboard operation
basic-memory copied to clipboard

build_context related_results schema validation fails in Claude Desktop (0.18.5)

Open bm-clawd opened this issue 9 months ago • 2 comments

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

  1. Call build_context with a URL that has related results (e.g. expand timeframe to 1 year)
  2. Claude Desktop rejects the response due to schema validation errors
  3. 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

bm-clawd avatar Feb 27 '26 15:02 bm-clawd

Claude encountered an error —— View job


I'll analyze this and get back to you.

claude[bot] avatar Feb 27 '26 15:02 claude[bot]

Duplicate of #627

bm-clawd avatar Feb 27 '26 15:02 bm-clawd