File tree Expand file tree Collapse file tree 3 files changed +219
-185
lines changed
Expand file tree Collapse file tree 3 files changed +219
-185
lines changed Original file line number Diff line number Diff line change 2929from basic_memory .schemas .search import SearchQuery , SearchItemType
3030
3131tool_app = typer .Typer ()
32- app .add_typer (tool_app , name = "tool" , help = "Direct access to MCP tools via CLI" )
32+ app .add_typer (tool_app , name = "tool" , help = "Access to MCP tools via CLI" )
3333
3434
3535@tool_app .command ()
@@ -103,6 +103,7 @@ def write_note(
103103
104104@tool_app .command ()
105105def read_note (identifier : str , page : int = 1 , page_size : int = 10 ):
106+ """Read a markdown note from the knowledge base."""
106107 try :
107108 note = asyncio .run (mcp_read_note (identifier , page , page_size ))
108109 rprint (note )
@@ -122,6 +123,7 @@ def build_context(
122123 page_size : int = 10 ,
123124 max_related : int = 10 ,
124125):
126+ """Get context needed to continue a discussion."""
125127 try :
126128 context = asyncio .run (
127129 mcp_build_context (
@@ -154,6 +156,7 @@ def recent_activity(
154156 page_size : int = 10 ,
155157 max_related : int = 10 ,
156158):
159+ """Get recent activity across the knowledge base."""
157160 try :
158161 context = asyncio .run (
159162 mcp_recent_activity (
@@ -189,6 +192,7 @@ def search(
189192 page : int = 1 ,
190193 page_size : int = 10 ,
191194):
195+ """Search across all content in the knowledge base."""
192196 if permalink and title : # pragma: no cover
193197 print ("Cannot search both permalink and title" )
194198 raise typer .Abort ()
Original file line number Diff line number Diff line change 99
1010
1111@mcp .tool (
12- description = "Search across all content in basic-memory, including documents and entities " ,
12+ description = "Search across all content in the knowledge base. " ,
1313)
1414async def search (query : SearchQuery , page : int = 1 , page_size : int = 10 ) -> SearchResponse :
15- """Search across all content in basic-memory .
15+ """Search across all content in the knowledge base .
1616
1717 This tool searches the knowledge base using full-text search, pattern matching,
1818 or exact permalink lookup. It supports filtering by content type, entity type,
You can’t perform that action at this time.
0 commit comments