Fix: Serialize response to JSON in add_memories MCP tool#3523
Merged
prateekchhikara merged 1 commit intomem0ai:mainfrom Sep 30, 2025
Merged
Conversation
The add_memories tool was returning a raw dict instead of a JSON string, causing MCP clients to fail with -32602 error. This aligns the return format with search_memory and list_memories which use json.dumps(). Fixes mem0ai#3400
Contributor
|
Hey @frederikb96 Thanks for raising the PR, can you please sign the CLA inorder to get things started? |
Contributor
Author
|
@parshvadaftari Thanks for super fast response 👍 I signed it 🙂 |
parshvadaftari
approved these changes
Sep 30, 2025
Contributor
parshvadaftari
left a comment
There was a problem hiding this comment.
Looks good to me!
garciaba79
pushed a commit
to garciaba79/mem0
that referenced
this pull request
Feb 12, 2026
jamebobob
pushed a commit
to jamebobob/mem0-vigil-recall
that referenced
this pull request
Mar 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The add_memories tool was returning a raw dict instead of a JSON string, causing MCP clients to fail with -32602 error. This aligns the return format with search_memory and list_memories which use json.dumps().
Fixes #3400
Super easy oneliner change...
Checklist:
Maintainer Checklist