diff --git a/cognee-mcp/src/cognee_client.py b/cognee-mcp/src/cognee_client.py index 9d98cb0b5..3ffbca8d8 100644 --- a/cognee-mcp/src/cognee_client.py +++ b/cognee-mcp/src/cognee_client.py @@ -192,9 +192,7 @@ class CogneeClient: with redirect_stdout(sys.stderr): results = await self.cognee.search( - query_type=SearchType[query_type.upper()], - query_text=query_text, - top_k=top_k + query_type=SearchType[query_type.upper()], query_text=query_text, top_k=top_k ) return results diff --git a/cognee-mcp/src/server.py b/cognee-mcp/src/server.py index f67b62648..c02de06c8 100755 --- a/cognee-mcp/src/server.py +++ b/cognee-mcp/src/server.py @@ -316,7 +316,7 @@ async def save_interaction(data: str) -> list: @mcp.tool() -async def search(search_query: str, search_type: str, top_k: int = 5) -> list: +async def search(search_query: str, search_type: str, top_k: int = 10) -> list: """ Search and query the knowledge graph for insights, information, and connections. @@ -390,7 +390,7 @@ async def search(search_query: str, search_type: str, top_k: int = 5) -> list: The search_type is case-insensitive and will be converted to uppercase. top_k : int, optional - Maximum number of results to return (default: 5). + Maximum number of results to return (default: 10). Controls the amount of context retrieved from the knowledge graph. - Lower values (3-5): Faster, more focused results - Higher values (10-20): More comprehensive, but slower and more context-heavy