Skip to content

Commit 731b502

Browse files
committed
docs: add help docs to mcp cli tools
Signed-off-by: phernandez <paul@basicmachines.co>
1 parent 2a881b1 commit 731b502

File tree

3 files changed

+219
-185
lines changed

3 files changed

+219
-185
lines changed

src/basic_memory/cli/commands/tool.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from basic_memory.schemas.search import SearchQuery, SearchItemType
3030

3131
tool_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()
105105
def 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()

src/basic_memory/mcp/tools/search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
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
)
1414
async 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,

0 commit comments

Comments
 (0)