Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions mcp_server/tools_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ async def _delete_graph():
).dict()


async def memory_search_rrf(
async def memory_search(
query: str = "",
user_id: str = "default",
limit: int = 10,
Expand All @@ -299,7 +299,7 @@ async def memory_search_rrf(
sources: "all" (RAG + Wiki), "rag" (RAG only), or "wiki" (Wiki only)
"""
metrics.inc("tool_calls")
metrics.inc("tool_search_rrf")
metrics.inc("tool_search")
app = _get_ctx(ctx)

include_rag = sources in ("all", "rag")
Expand All @@ -316,6 +316,10 @@ async def memory_search_rrf(
return SearchResult(results=results, count=len(results), method=strategy).dict()


# Backward compatibility alias
memory_search_rrf = memory_search


# Register all ops tools
_register_tools: dict[str, Any] = {
"memory_api_key": memory_api_key,
Expand All @@ -325,7 +329,7 @@ async def memory_search_rrf(
"memory_sync_replica": memory_sync_replica,
"memory_cleanup": memory_cleanup,
"memory_lucidity_purge": memory_lucidity_purge,
"memory_search_rrf": memory_search_rrf,
"memory_search": memory_search,
}

for _name, _func in _register_tools.items():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_auth_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def test_mcp_tools_are_async():
assert "memory_backup" in tool_names
assert "memory_api_key" in tool_names
assert "memory_lucidity_purge" in tool_names
assert "memory_search_rrf" in tool_names
assert "memory_search" in tool_names

for tool in tools:
assert inspect.iscoroutinefunction(tool.fn), f"{tool.name} is not async"
Expand Down
15 changes: 5 additions & 10 deletions tests/test_mcp/test_tools_ops_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@
import pytest
from unittest.mock import MagicMock
from mcp_server.tools_ops import (
memory_api_key,
memory_backup,
memory_saga,
memory_data,
memory_sync_replica,
memory_cleanup,
memory_lucidity_purge,
memory_search_rrf,
memory_api_key, memory_backup, memory_saga,
memory_data, memory_sync_replica, memory_cleanup,
memory_lucidity_purge, memory_search,
)


Expand Down Expand Up @@ -140,7 +135,7 @@ async def test_lucidity_purge():


@pytest.mark.asyncio
async def test_search_rrf():
async def test_search():
ctx = _make_ctx()
result = await memory_search_rrf(query="test", ctx=ctx)
result = await memory_search(query="test", ctx=ctx)
assert isinstance(result, dict)
Loading