Skip to content

Commit e89f543

Browse files
committed
fix(filesystem): clarify search_files matches file names, not contents
The description for search_files was ambiguous — it could be interpreted as searching file contents (like grep) when it actually matches file/directory names against a glob pattern. This caused AI assistants to misuse the tool by passing content strings as the pattern. Fixes modelcontextprotocol#896
1 parent f424458 commit e89f543

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎src/filesystem/index.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,8 @@ server.registerTool(
628628
{
629629
title: "Search Files",
630630
description:
631-
"Recursively search for files and directories matching a pattern. " +
631+
"Recursively search for files and directories whose names match a glob pattern. " +
632+
"This searches by file/directory name only — it does not search file contents. " +
632633
"The patterns should be glob-style patterns that match paths relative to the working directory. " +
633634
"Use pattern like '*.ext' to match files in current directory, and '**/*.ext' to match files in all subdirectories. " +
634635
"Returns full paths to all matching items. Great for finding files when you don't know their exact location. " +

0 commit comments

Comments
 (0)