Skip to main content
Glama

Get npm package details

get_package
Read-only

Fetch npm registry metadata for a package: latest version, install scripts (preinstall/postinstall are a key risk signal), maintainers, license, recent version history, weekly downloads, GitHub stars, TypeScript support, days since last publish, a topPackagesRank (position among npm's ~100k most-downloaded packages, from npmscan's own periodically-refreshed snapshot — not live), and a downloadTrend (growing/stable/declining vs. ~3 months ago). Also checks the LATEST version against OSV.dev for known vulnerabilities — isLatestVersionVulnerable/highestSeverity give a direct safe/not-safe answer, and each finding includes severity, a summary, and the fixedVersion to upgrade to (use get_package_version or query_vulnerabilities to check a specific older version instead). If the OSV.dev query itself fails (network/timeout/upstream outage), isLatestVersionVulnerable comes back false only because the field has to be a boolean — vulnerabilityCheckFailed:true is the real signal there, and means the safe/not-safe answer is unknown, not confirmed clean. Also returns popularityTier/maintenanceTier (deterministic rule-based labels, not model-generated) and a plain-language maintenanceSummary, plus a possibleTyposquatOf flag if the name is one typo away from a top-5,000 package while itself being obscure — read deprecated and maintenanceSummary before recommending a package, since a long gap since the last release can mean either a stable/finished package or a slowing one. Includes a link to the full npmscan.com analysis page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesExact npm package name, e.g. "lodash" or "@scope/name"

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
licenseYes
distTagsYes
homepageYes
keywordsYes
createdAtYes
modifiedAtYes
npmscanUrlYes
repositoryYes
descriptionYes
githubStarsYes
maintainersYes
downloadTrendYes
latestVersionYes
popularityTierYes
recentVersionsYes
hasBuiltInTypesYes
highestSeverityYes
maintenanceTierYes
topPackagesRankYes
vulnerabilitiesYes
weeklyDownloadsYes
latestVersionInfoYes
maintenanceSummaryYes
possibleTyposquatOfYes
daysSinceLastPublishYes
vulnerabilityCheckFailedYes
isLatestVersionVulnerableYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / vulnerabilities / items / properties / isMalware
      Added value: +{
      +  "description": "Confirmed-malicious package (MAL-* id/alias or CWE-506), not an ordinary vulnerability: remove it, do not patch.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / vulnerabilities / items / required
      Previous value: -[
      -  "id",
      -  "summary",
      -  "severity",
      -  "aliases",
      -  "publishedAt",
      -  "fixedVersion",
      -  "npmscanUrl"
      -]New value: +[
      +  "id",
      +  "summary",
      +  "severity",
      +  "aliases",
      +  "publishedAt",
      +  "fixedVersion",
      +  "isMalware",
      +  "npmscanUrl"
      +]
  2. Changed2 schema fields changed
    • addedOutput schema / properties / vulnerabilityCheckFailed
      Added value: +{
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "name",
      -  "description",
      -  "license",
      -  "homepage",
      -  "repository",
      -  "keywords",
      -  "maintainers",
      -  "distTags",
      -  "latestVersion",
      -  "latestVersionInfo",
      -  "recentVersions",
      -  "createdAt",
      -  "modifiedAt",
      -  "npmscanUrl",
      -  "weeklyDownloads",
      -  "githubStars",
      -  "hasBuiltInTypes",
      -  "daysSinceLastPublish",
      -  "popularityTier",
      -  "maintenanceTier",
      -  "maintenanceSummary",
      -  "topPackagesRank",
      -  "downloadTrend",
      -  "possibleTyposquatOf",
      -  "isLatestVersionVulnerable",
      -  "highestSeverity",
      -  "vulnerabilities"
      -]New value: +[
      +  "name",
      +  "description",
      +  "license",
      +  "homepage",
      +  "repository",
      +  "keywords",
      +  "maintainers",
      +  "distTags",
      +  "latestVersion",
      +  "latestVersionInfo",
      +  "recentVersions",
      +  "createdAt",
      +  "modifiedAt",
      +  "npmscanUrl",
      +  "weeklyDownloads",
      +  "githubStars",
      +  "hasBuiltInTypes",
      +  "daysSinceLastPublish",
      +  "popularityTier",
      +  "maintenanceTier",
      +  "maintenanceSummary",
      +  "topPackagesRank",
      +  "downloadTrend",
      +  "possibleTyposquatOf",
      +  "isLatestVersionVulnerable",
      +  "vulnerabilityCheckFailed",
      +  "highestSeverity",
      +  "vulnerabilities"
      +]
  3. Changed4 schema fields changed
    • addedOutput schema / properties / highestSeverity
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / isLatestVersionVulnerable
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / vulnerabilities
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "aliases": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "fixedVersion": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "id": {
      +        "type": "string"
      +      },
      +      "npmscanUrl": {
      +        "type": "string"
      +      },
      +      "publishedAt": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "severity": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "summary": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "summary",
      +      "severity",
      +      "aliases",
      +      "publishedAt",
      +      "fixedVersion",
      +      "npmscanUrl"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "name",
      -  "description",
      -  "license",
      -  "homepage",
      -  "repository",
      -  "keywords",
      -  "maintainers",
      -  "distTags",
      -  "latestVersion",
      -  "latestVersionInfo",
      -  "recentVersions",
      -  "createdAt",
      -  "modifiedAt",
      -  "npmscanUrl",
      -  "weeklyDownloads",
      -  "githubStars",
      -  "hasBuiltInTypes",
      -  "daysSinceLastPublish",
      -  "popularityTier",
      -  "maintenanceTier",
      -  "maintenanceSummary",
      -  "topPackagesRank",
      -  "downloadTrend",
      -  "possibleTyposquatOf"
      -]New value: +[
      +  "name",
      +  "description",
      +  "license",
      +  "homepage",
      +  "repository",
      +  "keywords",
      +  "maintainers",
      +  "distTags",
      +  "latestVersion",
      +  "latestVersionInfo",
      +  "recentVersions",
      +  "createdAt",
      +  "modifiedAt",
      +  "npmscanUrl",
      +  "weeklyDownloads",
      +  "githubStars",
      +  "hasBuiltInTypes",
      +  "daysSinceLastPublish",
      +  "popularityTier",
      +  "maintenanceTier",
      +  "maintenanceSummary",
      +  "topPackagesRank",
      +  "downloadTrend",
      +  "possibleTyposquatOf",
      +  "isLatestVersionVulnerable",
      +  "highestSeverity",
      +  "vulnerabilities"
      +]
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "createdAt": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "daysSinceLastPublish": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "description": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "distTags": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "downloadTrend": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "changePercent": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "direction": {
      +          "enum": [
      +            "growing",
      +            "stable",
      +            "declining",
      +            "unknown"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "direction",
      +        "changePercent"
      +      ],
      +      "type": "object"
      +    },
      +    "githubStars": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "hasBuiltInTypes": {
      +      "type": "boolean"
      +    },
      +    "homepage": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "keywords": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "latestVersion": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "latestVersionInfo": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "dependencies": {
      +              "additionalProperties": {
      +                "type": "string"
      +              },
      +              "type": "object"
      +            },
      +            "deprecated": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "scripts": {
      +              "additionalProperties": {
      +                "type": "string"
      +              },
      +              "type": "object"
      +            },
      +            "tarball": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "version": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "version",
      +            "dependencies",
      +            "scripts",
      +            "deprecated",
      +            "tarball"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "license": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "maintainers": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "email": {
      +            "type": "string"
      +          },
      +          "name": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "name"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "maintenanceSummary": {
      +      "type": "string"
      +    },
      +    "maintenanceTier": {
      +      "enum": [
      +        "active",
      +        "aging",
      +        "stale",
      +        "unknown"
      +      ],
      +      "type": "string"
      +    },
      +    "modifiedAt": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "npmscanUrl": {
      +      "type": "string"
      +    },
      +    "popularityTier": {
      +      "enum": [
      +        "very-high",
      +        "high",
      +        "moderate",
      +        "low",
      +        "very-low",
      +        "unknown"
      +      ],
      +      "type": "string"
      +    },
      +    "possibleTyposquatOf": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "name": {
      +              "type": "string"
      +            },
      +            "rank": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "name",
      +            "rank"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "recentVersions": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "publishedAt": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "version": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "version",
      +          "publishedAt"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "repository": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "topPackagesRank": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "weeklyDownloads": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "name",
      +    "description",
      +    "license",
      +    "homepage",
      +    "repository",
      +    "keywords",
      +    "maintainers",
      +    "distTags",
      +    "latestVersion",
      +    "latestVersionInfo",
      +    "recentVersions",
      +    "createdAt",
      +    "modifiedAt",
      +    "npmscanUrl",
      +    "weeklyDownloads",
      +    "githubStars",
      +    "hasBuiltInTypes",
      +    "daysSinceLastPublish",
      +    "popularityTier",
      +    "maintenanceTier",
      +    "maintenanceSummary",
      +    "topPackagesRank",
      +    "downloadTrend",
      +    "possibleTyposquatOf"
      +  ],
      +  "type": "object"
      +}
  5. First observed

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the readOnly/openWorld annotations: it discloses the vulnerabilityCheckFailed failure-mode trap (false boolean is not confirmation), that topPackagesRank is a periodic snapshot not live data, that tiers are deterministic rule-based labels, and that typosquat flagging only applies when the name is obscure. These are non-obvious behavioral traits an agent could not infer from structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and field list before caveats, and every clause ties to a real output signal. It is a single dense block that is somewhat hard to scan, but given the breadth of return fields the length largely earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, yet the description still adds interpretive context (vulnerability failure semantics, snapshot staleness, maintenance interpretation). Combined with annotations covering the safety profile, nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one parameter (name) at 100% schema description coverage, so the schema already documents that it must be an exact package name including scoped names. The description adds no format or syntax detail beyond the schema, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Fetch) and resource (npm registry metadata for a package) and enumerates the returned signals. An agent can clearly distinguish this broad package-profile tool from narrower siblings like get_package_version without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit routing: 'use get_package_version or query_vulnerabilities to check a specific older version instead.' It also advises reading deprecated/maintenanceSummary before recommending, and notes the vuln check targets only the latest version. It does not cover when to prefer siblings like compare_packages or search_packages, so it falls short of full when/when-not coverage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources