Skip to content

Commit 7bb0ae5

Browse files
committed
docs: update find_files docstring to reflect new functionality
- Remove outdated auto-refresh behavior documentation - Add filename-only search capability description - Update examples to show new pattern matching features - Document directory tree traversal performance improvements - Clarify cross-platform path handling
1 parent 8348e2b commit 7bb0ae5

File tree

4 files changed

+8
-148
lines changed

4 files changed

+8
-148
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,14 @@ Thumbs.db
3838
# Code Index MCP specific files
3939
.code_indexer/
4040

41-
# Test files
42-
test_*.py
4341

4442
# Claude Code generated files
4543
CLAUDE.local.md
4644
.claude/
4745
.claude_chat/
4846
claude_*
4947
COMMIT_MESSAGE.txt
48+
RELEASE_NOTE.txt
5049

5150
.llm-context/
5251
.kiro/

src/code_index_mcp/server.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,20 +171,21 @@ def search_code_advanced(
171171
@handle_mcp_tool_errors(return_type='dict')
172172
def find_files(pattern: str, ctx: Context) -> Dict[str, Any]:
173173
"""
174-
Find files matching a glob pattern. Auto-refreshes index if no results found.
174+
Find files matching a glob pattern using efficient directory tree traversal.
175175
176176
Use when:
177177
- Looking for files by pattern (e.g., "*.py", "test_*.js", "src/**/*.ts")
178+
- Searching by filename only (e.g., "README.md" finds all README files)
178179
- Checking if specific files exist in the project
179180
- Getting file lists for further analysis
180181
181-
Auto-refresh behavior:
182-
- If no files found, automatically refreshes index once and retries
183-
- Rate limited to once every 5 seconds to avoid excessive refreshes
184-
- Manual refresh_index tool is always available without rate limits
182+
Pattern matching:
183+
- Supports both full path and filename-only matching
184+
- Uses forward slashes consistently across all platforms
185+
- Efficient directory tree traversal for better performance
185186
186187
Args:
187-
pattern: Glob pattern to match files (e.g., "*.py", "test_*.js")
188+
pattern: Glob pattern to match files (e.g., "*.py", "test_*.js", "README.md")
188189
189190
Returns:
190191
Dictionary with files list and status information

tests/README.md

Lines changed: 0 additions & 57 deletions
This file was deleted.

tests/run_all_enhanced_tests.py

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)