-
Notifications
You must be signed in to change notification settings - Fork 112
feat(mcp): add async_processing parameter to retain tool #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nicoloboschi
merged 8 commits into
vectorize-io:main
from
slayoffer:fix/mcp-http-app-path
Jan 8, 2026
Merged
feat(mcp): add async_processing parameter to retain tool #95
nicoloboschi
merged 8 commits into
vectorize-io:main
from
slayoffer:fix/mcp-http-app-path
Jan 8, 2026
+75
−98
Conversation
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
nicoloboschi
approved these changes
Jan 5, 2026
Collaborator
|
hey @slayoffer thanks for your contribution, |
Add async_processing parameter (default: True) to the MCP retain tool to allow non-blocking memory storage. When True, memories are queued for background processing and the tool returns immediately. When False, the tool waits for completion before returning. This matches the async behavior available in the HTTP API. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add two missing MCP tools to achieve feature parity with HTTP API: - list_memories: browse memories with pagination and full-text search (equivalent to GET /memories/list) - reflect: LLM-based reasoning over memories with disposition awareness (equivalent to POST /reflect) Both tools follow the existing pattern with JSON string responses and proper error handling.
- Add memory types explanation (world, experience, opinion, observation) - Document retain/ and search/ submodule structure - Add commands for single test run, ruff format, ty type checking - Note MCP server implementation in API layer - Add optional environment variables section - Clarify conventions (no Python files at root, npm workspaces)
These are user-specific development tool configs that should not be committed.
bac37ca to
008a487
Compare
nicoloboschi
requested changes
Jan 7, 2026
| return json.dumps({"error": str(e)}) | ||
|
|
||
| @mcp.tool() | ||
| async def list_memories( |
Collaborator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@slayoffer I think this tool is misleading for the agent, it should use recall, the list method is mostly for debugging and exploration, not for real usage
The list_memories endpoint is for debugging/exploration, not agent use. Agents should use recall for semantic search instead. Feedback from maintainer: "this tool is misleading for the agent, it should use recall, the list method is mostly for debugging and exploration, not for real usage" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
These admin/orchestration tools are not needed for typical agent usage. Agents work with a single configured bank via X-Bank-Id header. MCP now exposes only core memory operations: - retain: store memories - recall: semantic search - reflect: LLM reasoning over memories Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.
Summary
Adds
async_processingparameter to the MCPretaintool, allowing non-blocking memory storage.Changes:
async_processing: bool = Trueparameter toretaintoolTrue(default): queues memory for background processing, returns immediatelyFalse: waits for memory processing to complete before returningThis complements the existing multi-bank support added in v0.2.1.
Why
The retain tool was blocking callers during memory processing. This can be slow for complex content. The new parameter gives callers control:
async_processing=Truefor fire-and-forget storage (default, faster)async_processing=Falsewhen you need confirmation before proceedingTest plan
async_processing=True(should return immediately with operation_id)async_processing=False(should wait for completion)🤖 Generated with Claude Code