Skip to main content
Glama

Get a specific npm package version

get_package_version
Read-only

Fetch registry metadata for one exact version of a package (dependencies, install scripts, tarball) AND check that exact version against OSV.dev for known vulnerabilities — isVulnerable/highestSeverity give a direct answer, and each finding includes severity, a summary, and the fixedVersion to upgrade to. Use this to check a version pinned in a lockfile rather than the latest release. If the OSV.dev query itself fails (network/timeout/upstream outage), isVulnerable comes back false only because the field has to be a boolean — vulnerabilityCheckFailed:true is the real signal there, and means the answer is unknown, not confirmed clean.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesExact npm package name
versionYesExact version string, e.g. "4.17.21"

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
shasumYes
licenseYes
scriptsYes
tarballYes
versionYes
deprecatedYes
npmscanUrlYes
descriptionYes
dependenciesYes
isVulnerableYes
highestSeverityYes
vulnerabilitiesYes
vulnerabilityCheckFailedYes

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",
      -  "version",
      -  "description",
      -  "license",
      -  "dependencies",
      -  "scripts",
      -  "deprecated",
      -  "tarball",
      -  "shasum",
      -  "npmscanUrl",
      -  "isVulnerable",
      -  "highestSeverity",
      -  "vulnerabilities"
      -]New value: +[
      +  "name",
      +  "version",
      +  "description",
      +  "license",
      +  "dependencies",
      +  "scripts",
      +  "deprecated",
      +  "tarball",
      +  "shasum",
      +  "npmscanUrl",
      +  "isVulnerable",
      +  "vulnerabilityCheckFailed",
      +  "highestSeverity",
      +  "vulnerabilities"
      +]
  2. Changed4 schema fields changed
    • addedOutput schema / properties / highestSeverity
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / isVulnerable
      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",
      -  "version",
      -  "description",
      -  "license",
      -  "dependencies",
      -  "scripts",
      -  "deprecated",
      -  "tarball",
      -  "shasum",
      -  "npmscanUrl"
      -]New value: +[
      +  "name",
      +  "version",
      +  "description",
      +  "license",
      +  "dependencies",
      +  "scripts",
      +  "deprecated",
      +  "tarball",
      +  "shasum",
      +  "npmscanUrl",
      +  "isVulnerable",
      +  "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": {
      +    "dependencies": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "deprecated": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "description": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "license": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "npmscanUrl": {
      +      "type": "string"
      +    },
      +    "scripts": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "shasum": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "tarball": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "version": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "name",
      +    "version",
      +    "description",
      +    "license",
      +    "dependencies",
      +    "scripts",
      +    "deprecated",
      +    "tarball",
      +    "shasum",
      +    "npmscanUrl"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already set readOnlyHint, openWorldHint, and destructiveHint=false. The description goes further by detailing the failure mode of the OSV.dev query: when the query fails, isVulnerable is forced to false and vulnerabilityCheckFailed:true is the real signal. This is critical behavioral disclosure beyond annotations and prevents misinterpretation of a false negative.

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?

The description is longer than average but every sentence carries weight: purpose, key outputs, usage guidance, and failure-mode caveat. It is front-loaded with the core action and ends with the most nuanced edge case. No filler or redundancy.

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 (registry metadata + vulnerability check), the description covers the essential return fields (isVulnerable, highestSeverity, findings with severity/summary/fixedVersion) and explicitly addresses the failure case. The output schema exists, so full enumeration isn't needed. An agent has everything necessary to call it correctly and interpret results accurately.

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?

Schema description coverage is 100%, so both name and version are fully described in the schema. The description adds context about the use case (lockfile pins) but doesn't add parameter-specific meaning beyond what the schema already provides. Baseline of 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?

The description states a specific verb ('Fetch registry metadata') and resource ('one exact version of a package'), then adds the secondary action of checking against OSV.dev. It distinguishes itself from siblings like get_package (latest release) and query_vulnerabilities by explicitly targeting exact pinned versions. No ambiguity.

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?

It gives an explicit when-to-use: 'Use this to check a version pinned in a lockfile rather than the latest release.' This clearly routes the agent away from using it for latest versions, implicitly pointing to alternatives. It also explains how to interpret edge-case failure behavior, adding operational guidance.

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