Skip to main content
Glama

outdated

Check for outdated packages in a project to identify dependencies needing updates, ensuring project health and security.

Instructions

Check for outdated packages in a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the package directory
globalNoCheck global packages
longNoShow extended information

Implementation Reference

  • The tool 'outdated' is registered and implemented directly in src/index.ts, using the 'run' helper to execute 'npm outdated' with appropriate arguments.
    server.tool(
      "outdated",
      "Check for outdated packages in a project",
      {
        path: z.string().describe("Absolute path to the package directory"),
        global: z.boolean().optional().describe("Check global packages"),
        long: z.boolean().optional().describe("Show extended information"),
      },
      async ({ path, global: isGlobal, long }) => {
        const args = ["outdated", "--json"];
        if (isGlobal) args.push("-g");
        if (long) args.push("--long");
        try {
          const { stdout } = await run(args, path);
          return { content: [{ type: "text", text: stdout || "{}" }] };
        } catch (e: any) {
          // npm outdated exits non-zero when outdated packages found
          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