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 / 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"
      +]
  2. 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"
      +]
  3. 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"
      +}
  4. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the tool's safety is clear. The description adds valuable behavioral context: explains that the topPackagesRank is from a periodically-refreshed snapshot not live, that vulnerabilityCheckFailed distinguishes unknown from clean, and that maintenanceTier and popularityTier are rule-based not model-generated. This goes beyond annotations without contradicting them.

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

Conciseness3/5

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

The description is dense and front-loads the core purpose, but it is overly long and includes many enumerated details that could be summarized without losing critical guidance. The sentences are long and packed with information, making it less scannable. It earns a 3 because it does convey necessary context but lacks brevity and clear separation of ideas.

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?

Given the tool's complexity (returns many fields, has output schema, and handles failure modes), the description is thorough: it covers return values implicitly via field enumeration, explains failure signals, and provides guidance on interpretation. The presence of an output schema reduces the need to describe return structure, and the description fills in the nuanced behaviors.

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

Parameters4/5

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

The schema coverage is 100% with a clear description of the 'name' parameter (exact package name, with examples). The description reinforces the importance of the package name but does not add further parameter-specific details beyond what the schema states, so a slight deduction is reasonable.

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?

The description clearly states the tool fetches npm registry metadata and enumerates a comprehensive list of fields, including version, install scripts, maintainers, license, download trends, vulnerability status, and more. It distinguishes itself from siblings like get_package_version by explicitly pointing to alternative tools for specific older version checks.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool vs alternatives: it says to use get_package_version or query_vulnerabilities for specific older versions, and it warns to read deprecated and maintenanceSummary before recommending. It also explains the behavior of vulnerabilityCheckFailed, setting clear expectations for failure conditions.

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