You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
search misses things all the time. Also, it searches incorrect paths not in the allow list in the mcp config. I would think that rather than having the LLM search whatever random string it hallucinates when trying to find a file, that it would first match to the closest file It actually has permission to instead of just... fail "let me look for the right file" fail "oh I don't have access to that" fail "let me try that again" fail "oh now I see what I should be searching for" fail {end of context please start again}
Finndersen
changed the title
"search_files" tool of Filesystem example MCP server does not work properly
"search_files" tool of Filesystem example MCP server does not work as expected
Mar 5, 2025
Describe the bug
It is expected that the
pattern
argument of thesearch_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 theexcludePatterns
argument.To Reproduce
Steps to reproduce the behavior:
search_files
tool providingpattern
argument with glob/regex style wildcard pattern e.g. "*.py"Expected behavior
search_files
toolpattern
argument should support glob/regex style wildcard patternsI'm planning on creating a fix for this soon!
The text was updated successfully, but these errors were encountered: