refactor: Use same default_k value in MCP as for Cognee

This commit is contained in:
Igor Ilic 2026-01-08 12:47:42 +01:00
parent b339529621
commit be738df88a

View file

@ -316,7 +316,7 @@ async def save_interaction(data: str) -> list:
@mcp.tool() @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. 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. The search_type is case-insensitive and will be converted to uppercase.
top_k : int, optional 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. Controls the amount of context retrieved from the knowledge graph.
- Lower values (3-5): Faster, more focused results - Lower values (3-5): Faster, more focused results
- Higher values (10-20): More comprehensive, but slower and more context-heavy - Higher values (10-20): More comprehensive, but slower and more context-heavy