From a1855509d1dbf7f501ec711ceefb09e688179335 Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 21:44:06 +0000 Subject: [PATCH] feat: register search_files tool with excludePatterns support --- src/filesystem/index.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index 8507043b..b1eaf6a7 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -163,7 +163,16 @@ const server = new Server( }, { capabilities: { - tools: {}, + tools: { + search_files: { + description: "Recursively search for files/directories with optional exclude patterns", + inputSchema: zodToJsonSchema(SearchFilesArgsSchema), + handler: async ({ path: searchPath, pattern, excludePatterns }) => { + const validatedPath = await validatePath(searchPath); + return searchFiles(validatedPath, pattern, excludePatterns); + }, + }, + }, }, }, );