@@ -37,7 +37,7 @@ def __init__(self, ctx):
37
37
super ().__init__ (ctx )
38
38
self ._matcher_tool = FileMatchingTool ()
39
39
40
- def find_files (self , pattern : str , max_results : Optional [int ] = None ) -> Dict [str , Any ]:
40
+ def find_files (self , pattern : str , max_results : Optional [int ] = None ) -> List [str ]:
41
41
"""
42
42
Find files matching the given pattern using intelligent discovery.
43
43
@@ -50,7 +50,7 @@ def find_files(self, pattern: str, max_results: Optional[int] = None) -> Dict[st
50
50
max_results: Maximum number of results to return (None for no limit)
51
51
52
52
Returns:
53
- Dictionary with discovery results and metadata
53
+ List of file paths matching the pattern
54
54
55
55
Raises:
56
56
ValueError: If pattern is invalid or project not set up
@@ -282,21 +282,14 @@ def _gather_discovery_metadata(self, all_files, matched_files, limited_files, pa
282
282
'original_pattern' : pattern
283
283
}
284
284
285
- def _format_discovery_result (self , discovery_result : FileDiscoveryResult ) -> Dict [str , Any ]:
285
+ def _format_discovery_result (self , discovery_result : FileDiscoveryResult ) -> List [str ]:
286
286
"""
287
287
Format the discovery result according to business requirements.
288
288
289
289
Args:
290
290
discovery_result: Raw discovery result
291
291
292
292
Returns:
293
- Formatted result dictionary for MCP response
293
+ Simple list of file paths
294
294
"""
295
- return {
296
- 'files' : discovery_result .files ,
297
- 'total' : discovery_result .total_count ,
298
- 'pattern' : discovery_result .pattern_used ,
299
- 'strategy' : discovery_result .search_strategy ,
300
- 'metadata' : discovery_result .metadata ,
301
- 'status' : 'success'
302
- }
295
+ return discovery_result .files
0 commit comments