diff --git a/src/basic_memory/man/man3/bm-find(3).md b/src/basic_memory/man/man3/bm-find(3).md index 7f931cdee..1cbc1a54e 100644 --- a/src/basic_memory/man/man3/bm-find(3).md +++ b/src/basic_memory/man/man3/bm-find(3).md @@ -37,7 +37,7 @@ The shell counterpart is find(1). ## PARAMETERS - **project** (string, required) — Required project name, 'workspace/project', or project external id. Discover projects with bm_project_list(). Paths are relative to this project; a qualified path must agree with it. -- **path** (string, optional, default: "/") — A directory in the project, e.g. 'specs' or 'specs/active'. '/' is the project root; '/path' addresses another project. +- **path** (string, optional, default: "/") — A directory in the project, e.g. 'specs' or 'specs/active'. '/' is the project root; '/path' must agree with the project parameter. - **name** (string | null, optional, default: None) — File-name glob, e.g. '*.md'. Not with `filters`. - **filters** (object | null, optional, default: None) — Frontmatter filters as {field: condition}. Nested fields use dot notation ("schema.confidence"). A condition is a value for equality ({"status": "draft"}), null for absent-or-null ({"owner": null}), a list for contains-all ({"tags": ["a", "b"]}), or an operator object with $gt, $gte, $lt, $lte, $in, $between, $contains or $exists, e.g. {"priority": {"$in": ["high"]}}. Several operators on one field AND together. - **fields** (array | null, optional, default: None) — Frontmatter fields to return per note (dot paths allowed), e.g. ["title", "priority"]. Needs `filters`. diff --git a/src/basic_memory/man/man3/bm-list(3).md b/src/basic_memory/man/man3/bm-list(3).md index 66462c350..ba12f3155 100644 --- a/src/basic_memory/man/man3/bm-list(3).md +++ b/src/basic_memory/man/man3/bm-list(3).md @@ -38,7 +38,7 @@ The shell counterpart is ls(1). ## PARAMETERS - **project** (string, required) — Required project name, 'workspace/project', or project external id. Discover projects with bm_project_list(). Paths are relative to this project; a qualified path must agree with it. -- **path** (string, optional, default: "/") — A directory in the project, e.g. 'specs' or 'specs/active'. '/' is the project root; '/path' addresses another project. +- **path** (string, optional, default: "/") — A directory in the project, e.g. 'specs' or 'specs/active'. '/' is the project root; '/path' must agree with the project parameter. - **glob** (string | null, optional, default: None) — File-name glob, e.g. '*.md' or '*meeting*'. - **sort** (string | null, optional, default: None) — File order. Folders always come first. - **page** (integer, optional, default: 1) — Page number. diff --git a/src/basic_memory/mcp/project_context.py b/src/basic_memory/mcp/project_context.py index 5c8419b0a..c325e16ce 100644 --- a/src/basic_memory/mcp/project_context.py +++ b/src/basic_memory/mcp/project_context.py @@ -1859,8 +1859,8 @@ async def resolve_project_path_route( ) raise ProjectPrefixConflictError( f"path names project '{detected}' but project '{explicit}' was passed — " - f"use '{detected}/' alone, or project='{explicit}' with a " - "project-relative path" + f"use project='{detected}' with a project-relative path, or " + f"project='{explicit}' with a project-relative path" ) if detected is not None: diff --git a/src/basic_memory/mcp/tool_params.py b/src/basic_memory/mcp/tool_params.py index 65dcfac07..0695d2e61 100644 --- a/src/basic_memory/mcp/tool_params.py +++ b/src/basic_memory/mcp/tool_params.py @@ -41,7 +41,7 @@ validation_alias=AliasChoices("path", "dir_name", "folder"), description=( "A directory in the project, e.g. 'specs' or 'specs/active'. '/' is the " - "project root; '/path' addresses another project." + "project root; '/path' must agree with the project parameter." ), ), ] diff --git a/tests/mcp/test_project_path_routing.py b/tests/mcp/test_project_path_routing.py index e6f858680..c06a80f21 100644 --- a/tests/mcp/test_project_path_routing.py +++ b/tests/mcp/test_project_path_routing.py @@ -396,8 +396,8 @@ async def test_conflicting_prefix_raises_naming_both(multi_project_config): assert str(excinfo.value) == ( "path names project 'second-project' but project 'My Research' was passed — " - "use 'second-project/' alone, or project='My Research' with a " - "project-relative path" + "use project='second-project' with a project-relative path, or " + "project='My Research' with a project-relative path" )