From 42bcd12ee122ef7f5e5cfdbb14c116739171503e Mon Sep 17 00:00:00 2001 From: Brent Kearney Date: Thu, 12 Mar 2026 02:02:38 -0600 Subject: [PATCH] fix: send messages in chat format in MCP add_memory tool The /product/add endpoint expects messages as a list of chat message objects, not a plain string. When passed a string, the SimpleStruct MemReader silently skips it and no memory is stored. Co-Authored-By: Claude Opus 4.6 --- examples/mem_mcp/simple_fastmcp_serve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/mem_mcp/simple_fastmcp_serve.py b/examples/mem_mcp/simple_fastmcp_serve.py index 55ad4d84d..5071314e0 100644 --- a/examples/mem_mcp/simple_fastmcp_serve.py +++ b/examples/mem_mcp/simple_fastmcp_serve.py @@ -23,7 +23,7 @@ def add_memory(memory_content: str, user_id: str, cube_id: str | None = None): """Add memory using the Server API.""" payload = { "user_id": user_id, - "messages": memory_content, + "messages": [{"role": "user", "content": memory_content}], "writable_cube_ids": [cube_id] if cube_id else None, } try: