Describe the bug
It is expected that the pattern argument of the search_files tool would support glob/regex style wildcard patterns, e.g. "*.py", but it does not.
Looking at the implementation it is easy to see why, for some reason it just does a basic substring inclusion test instead of a proper glob minimatch() like it does for the excludePatterns argument.
To Reproduce
Steps to reproduce the behavior:
- Start Filesystem MCP and connect client
- Try use
search_files tool providing pattern argument with glob/regex style wildcard pattern e.g. "*.py"
- get "No matches found" even when there are files that match
Expected behavior
search_files tool pattern argument should support glob/regex style wildcard patterns
I'm planning on creating a fix for this soon!
Describe the bug
It is expected that the
patternargument of thesearch_filestool would support glob/regex style wildcard patterns, e.g. "*.py", but it does not.Looking at the implementation it is easy to see why, for some reason it just does a basic substring inclusion test instead of a proper glob
minimatch()like it does for theexcludePatternsargument.To Reproduce
Steps to reproduce the behavior:
search_filestool providingpatternargument with glob/regex style wildcard pattern e.g. "*.py"Expected behavior
search_filestoolpatternargument should support glob/regex style wildcard patternsI'm planning on creating a fix for this soon!