diff --git a/src/index.ts b/src/index.ts index 9cbb25e..1ea6f46 100644 --- a/src/index.ts +++ b/src/index.ts @@ -51,7 +51,9 @@ async function loadAllTools(): Promise { for (const file of toolFiles) { try { const toolPath = join(toolsDir, file); - const toolModule = await import(toolPath); + // If the OS is windows, prepend 'file://' to the path + const isWindows = process.platform === 'win32'; + const toolModule = await import(isWindows ? `file://${toolPath}`: toolPath); if ( toolModule.method &&