Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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 }] };
        }
      },
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mikusnuz/npm-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server