Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"search_files" tool of Filesystem example MCP server does not work as expected #735

Open
Finndersen opened this issue Mar 4, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@Finndersen
Copy link

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:

  1. Start Filesystem MCP and connect client
  2. Try use search_files tool providing pattern argument with glob/regex style wildcard pattern e.g. "*.py"
  3. 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!

@Finndersen Finndersen added the bug Something isn't working label Mar 4, 2025
@braddo99
Copy link

braddo99 commented Mar 5, 2025

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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants