doctor
Check npm environment health by running diagnostics to identify and resolve package management issues.
Instructions
Run diagnostics to check npm environment health
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:892-906 (handler)The tool 'doctor' is defined and registered using server.tool, and its handler logic executes `npm doctor` using the `run` helper function.
// ── npm doctor ── server.tool( "doctor", "Run diagnostics to check npm environment health", {}, async () => { try { const { stdout, stderr } = await run(["doctor"]); return { content: [{ type: "text", text: stdout + stderr }] }; } catch (e: any) { // doctor may exit non-zero if checks fail return { content: [{ type: "text", text: e.stdout || e.stderr || e.message }] }; } }, );