Skip to content

Commit 4ea392d

Browse files
phernandezclaude
andcommitted
fix: rename list_projects to list_memory_projects to avoid naming conflicts
The tool name 'list_projects' was too generic and could conflict with other MCP servers. Renamed to 'list_memory_projects' for better specificity and namespace isolation. Changes: - Renamed @mcp.tool() decorator from 'list_projects' to 'list_memory_projects' - Updated all test references to use the new tool name - Tool functionality remains identical, only the name changed 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d491757 commit 4ea392d

5 files changed

Lines changed: 24 additions & 18 deletions

File tree

.claude/commands/release/release.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ You are an expert release manager for the Basic Memory project. When the user ru
2020
3. Verify we're on the `main` branch
2121
4. Confirm no existing tag with this version
2222

23+
#### Documentation Validation
24+
1. **Changelog Check**
25+
- CHANGELOG.md contains entry for target version
26+
- Entry includes all major features and fixes
27+
- Breaking changes are documented
28+
2329
### Step 2: Use Justfile Automation
2430
Execute the automated release process:
2531
```bash

src/basic_memory/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def get_project_config(project_name: Optional[str] = None) -> ProjectConfig:
275275
return ProjectConfig(name=name, home=Path(path))
276276

277277
# otherwise raise error
278-
raise ValueError(f"Project '{actual_project_name}' not found")
278+
raise ValueError(f"Project '{actual_project_name}' not found") # pragma: no cover
279279

280280

281281
# Create config manager

src/basic_memory/mcp/tools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@
4848
"sync_status",
4949
"view_note",
5050
"write_note",
51-
]
51+
]

src/basic_memory/mcp/tools/project_management.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from basic_memory.utils import generate_permalink
1919

2020

21-
@mcp.tool()
21+
@mcp.tool("list_memory_projects")
2222
async def list_projects(ctx: Context | None = None) -> str:
2323
"""List all available projects with their status.
2424
@@ -341,4 +341,4 @@ async def delete_project(project_name: str, ctx: Context | None = None) -> str:
341341
result += "Files remain on disk but project is no longer tracked by Basic Memory.\n"
342342
result += "Re-add the project to access its content again.\n"
343343

344-
return add_project_metadata(result, session.get_current_project())
344+
return add_project_metadata(result, session.get_current_project())

test-int/mcp/test_project_management_integration.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async def test_list_projects_basic_operation(mcp_server, app):
1515
async with Client(mcp_server) as client:
1616
# List all available projects
1717
list_result = await client.call_tool(
18-
"list_projects",
18+
"list_memory_projects",
1919
{},
2020
)
2121

@@ -248,7 +248,7 @@ async def test_project_management_workflow(mcp_server, app):
248248
assert "test-project" in current_result[0].text
249249

250250
# 2. List all projects
251-
list_result = await client.call_tool("list_projects", {})
251+
list_result = await client.call_tool("list_memory_projects", {})
252252
assert "Available projects:" in list_result[0].text
253253
assert "test-project" in list_result[0].text
254254

@@ -269,7 +269,7 @@ async def test_project_metadata_consistency(mcp_server, app):
269269
# Test all project management tools and verify they include project metadata
270270

271271
# list_projects
272-
list_result = await client.call_tool("list_projects", {})
272+
list_result = await client.call_tool("list_memory_projects", {})
273273
assert "Project: test-project" in list_result[0].text
274274

275275
# get_current_project
@@ -370,7 +370,7 @@ async def test_create_project_basic_operation(mcp_server, app):
370370
assert "Project: test-project" in create_text # Should still show current project
371371

372372
# Verify project appears in project list
373-
list_result = await client.call_tool("list_projects", {})
373+
list_result = await client.call_tool("list_memory_projects", {})
374374
list_text = list_result[0].text
375375
assert "test-new-project" in list_text
376376

@@ -454,7 +454,7 @@ async def test_delete_project_basic_operation(mcp_server, app):
454454
)
455455

456456
# Verify it exists
457-
list_result = await client.call_tool("list_projects", {})
457+
list_result = await client.call_tool("list_memory_projects", {})
458458
assert "to-be-deleted" in list_result[0].text
459459

460460
# Delete the project
@@ -478,7 +478,7 @@ async def test_delete_project_basic_operation(mcp_server, app):
478478
assert "Project: test-project" in delete_text # Should show current project
479479

480480
# Verify project no longer appears in list
481-
list_result_after = await client.call_tool("list_projects", {})
481+
list_result_after = await client.call_tool("list_memory_projects", {})
482482
assert "to-be-deleted" not in list_result_after[0].text
483483

484484

@@ -595,7 +595,7 @@ async def test_project_lifecycle_workflow(mcp_server, app):
595595
assert "removed successfully" in delete_result[0].text
596596

597597
# 7. Verify project is gone from list
598-
list_result = await client.call_tool("list_projects", {})
598+
list_result = await client.call_tool("list_memory_projects", {})
599599
assert project_name not in list_result[0].text
600600

601601

@@ -619,7 +619,7 @@ async def test_create_delete_project_edge_cases(mcp_server, app):
619619
assert special_name in create_result[0].text
620620

621621
# Verify it appears in list
622-
list_result = await client.call_tool("list_projects", {})
622+
list_result = await client.call_tool("list_memory_projects", {})
623623
assert special_name in list_result[0].text
624624

625625
# Delete it
@@ -633,7 +633,7 @@ async def test_create_delete_project_edge_cases(mcp_server, app):
633633
assert special_name in delete_result[0].text
634634

635635
# Verify it's gone
636-
list_result_after = await client.call_tool("list_projects", {})
636+
list_result_after = await client.call_tool("list_memory_projects", {})
637637
assert special_name not in list_result_after[0].text
638638

639639

@@ -655,7 +655,7 @@ async def test_case_insensitive_project_switching(mcp_server, app):
655655
assert project_name in create_result[0].text
656656

657657
# Verify project was created with canonical name
658-
list_result = await client.call_tool("list_projects", {})
658+
list_result = await client.call_tool("list_memory_projects", {})
659659
assert project_name in list_result[0].text
660660

661661
# Test switching with different case variations
@@ -817,7 +817,7 @@ async def test_case_preservation_in_project_list(mcp_server, app):
817817
)
818818

819819
# List projects and verify each appears with its original case
820-
list_result = await client.call_tool("list_projects", {})
820+
list_result = await client.call_tool("list_memory_projects", {})
821821
list_text = list_result[0].text
822822

823823
for project_name in test_projects:
@@ -880,7 +880,7 @@ async def test_session_state_consistency_after_case_switch(mcp_server, app):
880880
),
881881
("get_current_project", {}),
882882
("search_notes", {"query": "session"}),
883-
("list_projects", {}),
883+
("list_memory_projects", {}),
884884
]
885885

886886
for op_name, op_params in operations:
@@ -889,7 +889,7 @@ async def test_session_state_consistency_after_case_switch(mcp_server, app):
889889
# All operations should work and reference the canonical project name
890890
if op_name == "get_current_project":
891891
assert f"Current project: {project_name}" in result[0].text
892-
elif op_name == "list_projects":
892+
elif op_name == "list_memory_projects":
893893
assert project_name in result[0].text
894894
assert "(current)" in result[0].text or "current" in result[0].text.lower()
895895

@@ -899,4 +899,4 @@ async def test_session_state_consistency_after_case_switch(mcp_server, app):
899899

900900
# Clean up
901901
await client.call_tool("switch_project", {"project_name": "test-project"})
902-
await client.call_tool("delete_project", {"project_name": project_name})
902+
await client.call_tool("delete_project", {"project_name": project_name})

0 commit comments

Comments
 (0)