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
returnthis.createOutput(`No files matching pattern "${params.pattern}" found in ${path}`)
@@ -111,22 +114,37 @@ export class FileSearch {
111
114
return{
112
115
name: 'fileSearch',
113
116
description:
114
-
'Search for files in a directory and its subdirectories using regex patterns. It filters out build outputs such as `build/`, `out/` and `dist` and dependency directories such as `node_modules/`.\n * Results are filtered by the provided regex pattern.\n * Case sensitivity can be controlled with the caseSensitive parameter.\n * Results clearly distinguish between files, directories or symlinks with [F], [D] and [L] prefixes.',
117
+
'Search for files in a directory and its subdirectories using regex patterns.\n\n'+
118
+
'## Overview\n'+
119
+
'This tool searches for files matching a regex pattern, ignoring common build and dependency directories.\n\n'+
120
+
'## When to use\n'+
121
+
'- When you need to find files with specific naming patterns\n'+
122
+
'- When you need to locate files before using more targeted tools like fsRead\n'+
123
+
'- When you need to search across a project structure\n\n'+
124
+
'## When not to use\n'+
125
+
'- When you need to search file contents\n'+
126
+
'- When you already know the exact file path\n'+
127
+
'- When you need to list all files in a directory (use listDirectory instead)\n\n'+
128
+
'## Notes\n'+
129
+
'- This tool is more effective than running a command like `find` using `executeBash` tool\n'+
130
+
'- Case sensitivity can be controlled with the caseSensitive parameter\n'+
131
+
'- Use the `maxDepth` parameter to control how deep the directory traversal goes',
115
132
inputSchema: {
116
133
type: 'object',
117
134
properties: {
118
135
path: {
119
136
type: 'string',
120
-
description: 'Absolute path to a directory, e.g., `/repo`.',
137
+
description:
138
+
'Absolute path to a directory, e.g. `/repo` for Unix-like system including Unix/Linux/macOS or `d:\\repo\\` for Windows',
121
139
},
122
140
pattern: {
123
141
type: 'string',
124
-
description: 'Regex pattern to match against file and directory names.',
142
+
description: 'Regex pattern to match against file names.',
125
143
},
126
144
maxDepth: {
127
145
type: 'number',
128
146
description:
129
-
'Maximum depth to traverse when searching directories. Use `0` to search only the specified directory, `1` to include immediate subdirectories, etc. If it is not provided, it will search all subdirectories recursively.',
147
+
'Maximum depth to traverse when searching files. Use `0` to search only under the specified directory, `1` to include immediate subdirectories, etc. If it is not provided, it will search all subdirectories recursively.',
0 commit comments