Skip to content

Commit 15bf564

Browse files
coleam00claude
andcommitted
feat: MCP server optimization with tool consolidation and vertical slice architecture
- Consolidated MCP tools from ~20 to 8 tools for improved UX - Restructured to vertical slice architecture (features/domain pattern) - Optimized payload sizes with truncation and array count replacements - Changed default include_closed to true for better task visibility - Moved RAG module to features directory structure - Removed legacy modules directory in favor of feature-based organization Key improvements: - list_tasks, manage_task (create/update/delete consolidated) - list_projects, manage_project (create/update/delete consolidated) - list_documents, manage_document (create/update/delete consolidated) - list_versions, manage_version (create/restore consolidated) - Reduced default page size from 50 to 10 items - Added search query support to list operations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ce2f871 commit 15bf564

12 files changed

Lines changed: 938 additions & 1179 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def process_batch(items):
9898
### Code Quality
9999

100100
- Remove dead code immediately rather than maintaining it - no backward compatibility or legacy functions
101+
- Avoid backward compatibility mappings or legacy function wrappers when consolidating or refactoring tools
101102
- Prioritize functionality over production-ready patterns
102103
- Focus on user experience and feature completeness
103104
- When updating code, don't reference what is changing (avoid keywords like LEGACY, CHANGED, REMOVED), instead focus on comments that document just the functionality of the code

python/src/mcp_server/features/documents/document_tools.py

Lines changed: 213 additions & 258 deletions
Large diffs are not rendered by default.

python/src/mcp_server/features/documents/version_tools.py

Lines changed: 164 additions & 277 deletions
Large diffs are not rendered by default.

python/src/mcp_server/features/projects/project_tools.py

Lines changed: 263 additions & 287 deletions
Large diffs are not rendered by default.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""
2+
RAG (Retrieval-Augmented Generation) tools for Archon MCP Server.
3+
4+
This module provides tools for knowledge base operations:
5+
- perform_rag_query: Search knowledge base for relevant content
6+
- search_code_examples: Find code examples in the knowledge base
7+
- get_available_sources: List available knowledge sources
8+
"""
9+
10+
from .rag_tools import register_rag_tools
11+
12+
__all__ = ["register_rag_tools"]

python/src/mcp_server/modules/rag_module.py renamed to python/src/mcp_server/features/rag/rag_tools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def register_rag_tools(mcp: FastMCP):
4040
"""Register all RAG tools with the MCP server."""
4141

4242
@mcp.tool()
43-
async def get_available_sources(ctx: Context) -> str:
43+
async def rag_get_available_sources(ctx: Context) -> str:
4444
"""
4545
Get list of available sources in the knowledge base.
4646
@@ -77,7 +77,7 @@ async def get_available_sources(ctx: Context) -> str:
7777
return json.dumps({"success": False, "error": str(e)}, indent=2)
7878

7979
@mcp.tool()
80-
async def perform_rag_query(
80+
async def rag_search_knowledge_base(
8181
ctx: Context, query: str, source_domain: str | None = None, match_count: int = 5
8282
) -> str:
8383
"""
@@ -134,7 +134,7 @@ async def perform_rag_query(
134134
return json.dumps({"success": False, "results": [], "error": str(e)}, indent=2)
135135

136136
@mcp.tool()
137-
async def search_code_examples(
137+
async def rag_search_code_examples(
138138
ctx: Context, query: str, source_domain: str | None = None, match_count: int = 5
139139
) -> str:
140140
"""

0 commit comments

Comments
 (0)