Skip to content

Commit ffd9cb7

Browse files
fix: correct tool registration syntax for search_files
1 parent 00a30ac commit ffd9cb7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/filesystem/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,16 +163,17 @@ const server = new Server(
163163
},
164164
{
165165
capabilities: {
166-
tools: {
167-
search_files: {
166+
tools: [
167+
{
168+
name: "search_files",
168169
description: "Recursively search for files/directories with optional exclude patterns",
169170
inputSchema: zodToJsonSchema(SearchFilesArgsSchema),
170171
handler: async (args: z.infer<typeof SearchFilesArgsSchema>) => {
171172
const validatedPath = await validatePath(args.path);
172173
return searchFiles(validatedPath, args.pattern, args.excludePatterns);
173174
},
174175
},
175-
},
176+
],
176177
},
177178
},
178179
);

0 commit comments

Comments
 (0)