Skip to content

Commit 581b7b1

Browse files
fix: Add explicit type annotations to MCP tool parameters (#394)
Signed-off-by: phernandez <paul@basicmachines.co> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Paul Hernandez <phernandez@users.noreply.github.com>
1 parent d775f7b commit 581b7b1

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/basic_memory/mcp/tools/build_context.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
memory_url_path,
1717
)
1818

19-
type StringOrInt = str | int
20-
2119

2220
@mcp.tool(
2321
description="""Build context from a memory:// URI to continue conversations naturally.
@@ -39,7 +37,7 @@
3937
async def build_context(
4038
url: MemoryUrl,
4139
project: Optional[str] = None,
42-
depth: Optional[StringOrInt] = 1,
40+
depth: str | int | None = 1,
4341
timeframe: Optional[TimeFrame] = "7d",
4442
page: int = 1,
4543
page_size: int = 10,

src/basic_memory/mcp/tools/write_note.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async def write_note(
2828
content: str,
2929
folder: str,
3030
project: Optional[str] = None,
31-
tags=None,
31+
tags: list[str] | str | None = None,
3232
entity_type: str = "note",
3333
context: Context | None = None,
3434
) -> str:

0 commit comments

Comments
 (0)