|
31 | 31 | from .services.index_management_service import IndexManagementService |
32 | 32 | from .services.code_intelligence_service import CodeIntelligenceService |
33 | 33 | from .services.system_management_service import SystemManagementService |
34 | | -from .utils import ( |
35 | | - handle_mcp_resource_errors, handle_mcp_tool_errors |
36 | | -) |
| 34 | +from .utils import handle_mcp_tool_errors |
37 | 35 |
|
38 | 36 | # Setup logging without writing to files |
39 | 37 | def setup_indexing_performance_logging(): |
@@ -126,25 +124,6 @@ async def indexer_lifespan(_server: FastMCP) -> AsyncIterator[CodeIndexerContext |
126 | 124 | # Create the MCP server with lifespan manager |
127 | 125 | mcp = FastMCP("CodeIndexer", lifespan=indexer_lifespan, dependencies=["pathlib"]) |
128 | 126 |
|
129 | | -# ----- RESOURCES ----- |
130 | | - |
131 | | -@mcp.resource("config://code-indexer") |
132 | | -@handle_mcp_resource_errors |
133 | | -def get_config(ctx: Context) -> str: |
134 | | - """Get the current configuration of the Code Indexer.""" |
135 | | - return ProjectManagementService(ctx).get_project_config() |
136 | | - |
137 | | -@mcp.resource("files://{file_path}") |
138 | | -@handle_mcp_resource_errors |
139 | | -def get_file_content(file_path: str, ctx: Context) -> str: |
140 | | - """Get the content of a specific file.""" |
141 | | - # Use FileService for simple file reading - this is appropriate for a resource |
142 | | - return FileService(ctx).get_file_content(file_path) |
143 | | - |
144 | | -# Removed: structure://project resource - not necessary for most workflows |
145 | | -# Removed: settings://stats resource - this information is available via get_settings_info() tool |
146 | | -# and is more of a debugging/technical detail rather than context AI needs |
147 | | - |
148 | 127 | # ----- TOOLS ----- |
149 | 128 |
|
150 | 129 | @mcp.tool() |
|
0 commit comments