diff --git a/packages/mcp/src/examples/filesystem.ts b/packages/mcp/src/examples/filesystem.ts index 1bbf01d5db..81ede0a26a 100644 --- a/packages/mcp/src/examples/filesystem.ts +++ b/packages/mcp/src/examples/filesystem.ts @@ -162,8 +162,8 @@ const GetFileInfoArgsSchema = z.object({ path: z.string(), }); -const ToolInputSchema = ToolSchema.shape.inputSchema; -type ToolInput = z.infer; +type ToolInputSchema = typeof ToolSchema.shape.inputSchema; +type ToolInput = z.infer; interface FileInfo { size: number; @@ -237,7 +237,7 @@ async function searchFiles( if (entry.isDirectory()) { await search(fullPath); } - } catch (error) { + } catch { // Skip invalid paths during search continue; }