Skip to content

Commit db91e18

Browse files
feat: register search_files tool with excludePatterns support
1 parent c5a364e commit db91e18

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/filesystem/index.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,16 @@ const server = new Server(
163163
},
164164
{
165165
capabilities: {
166-
tools: {},
166+
tools: {
167+
search_files: {
168+
description: "Recursively search for files/directories with optional exclude patterns",
169+
inputSchema: zodToJsonSchema(SearchFilesArgsSchema),
170+
handler: async ({ path: searchPath, pattern, excludePatterns }) => {
171+
const validatedPath = await validatePath(searchPath);
172+
return searchFiles(validatedPath, pattern, excludePatterns);
173+
},
174+
},
175+
},
167176
},
168177
},
169178
);

0 commit comments

Comments
 (0)