mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-17 23:53:24 +02:00
fix: simplify server setup and rely on handlers for tool registration
This commit is contained in:
@@ -164,16 +164,6 @@ const server = new Server(
|
||||
{
|
||||
capabilities: {
|
||||
listChanged: false,
|
||||
tools: {
|
||||
search_files: {
|
||||
description: "Recursively search for files/directories with optional exclude patterns",
|
||||
inputSchema: zodToJsonSchema(SearchFilesArgsSchema),
|
||||
handler: async (args: z.infer<typeof SearchFilesArgsSchema>) => {
|
||||
const validatedPath = await validatePath(args.path);
|
||||
return searchFiles(validatedPath, args.pattern, args.excludePatterns);
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user