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", or a dist-tag such as "latest" (resolved to its exact version before the vulnerability check). Semver ranges like "^4.17.0" are not supported.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
shasumYes
licenseYes
scriptsYes
tarballYes
versionYes
deprecatedYes
npmscanUrlYes
descriptionYes
dependenciesYes
isVulnerableYes
existenceNoteYes
versionExistsYesfalse = the registry no longer lists this version but OSV still has advisories for it (e.g. unpublished for malware); registry metadata is empty then — see existenceNote.
highestSeverityYes
vulnerabilitiesYes
vulnerabilityCheckFailedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedOutput schema / properties / existenceNote
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / versionExists
      Added value: +{
      +  "description": "false = the registry no longer lists this version but OSV still has advisories for it (e.g. unpublished for malware); registry metadata is empty then — see existenceNote.",
      +  "type": "boolean"
      +}
    • 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"
      +]
    • changedOutput schema / required
      Previous value: -[
      -  "name",
      -  "version",
      -  "description",
      -  "license",
      -  "dependencies",
      -  "scripts",
      -  "deprecated",
      -  "tarball",
      -  "shasum",
      -  "npmscanUrl",
      -  "isVulnerable",
      -  "vulnerabilityCheckFailed",
      -  "highestSeverity",
      -  "vulnerabilities"
      -]New value: +[
      +  "name",
      +  "version",
      +  "description",
      +  "license",
      +  "dependencies",
      +  "scripts",
      +  "deprecated",
      +  "tarball",
      +  "shasum",
      +  "npmscanUrl",
      +  "versionExists",
      +  "existenceNote",
      +  "isVulnerable",
      +  "vulnerabilityCheckFailed",
      +  "highestSeverity",
      +  "vulnerabilities"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / version / description
      Previous value: -"Exact version string, e.g. \"4.17.21\""New value: +"Exact version string, e.g. \"4.17.21\", or a dist-tag such as \"latest\" (resolved to its exact version before the vulnerability check). Semver ranges like \"^4.17.0\" are not supported."
  3. 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"
      +]
  4. 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"
      +]
  5. 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"
      +}
  6. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare the safe read-only, open-world profile, yet the description goes further: it explains the meaning of isVulnerable, highestSeverity, severity, summary, and fixedVersion, and critically discloses a failure mode most tools hide — that vulnerabilityCheckFailed:true means the OSV query failed and the answer is unknown, not confirmed clean. That is exactly the kind of nuance structured fields cannot convey.

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 front-loaded with what the tool returns, then the when-to-use guidance, then the failure-mode caveat. It is dense but every sentence carries information an agent needs; the only slight redundancy is restating field names already visible in the output schema.

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?

With an output schema present, the description need not explain return values, yet it crisply maps the key fields and closes the loop on the ambiguous failure case. For a read-only, open-world lookup tool, nothing an agent needs to call it correctly or interpret its output 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?

Schema description coverage is 100%: both name (exact npm package name) and version (exact version or dist-tag, semver ranges unsupported) are fully documented in the schema. The description reinforces 'exact version' but adds no syntax or format detail beyond what the schema already provides, so the baseline 3 applies.

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 and two distinct resources: fetches registry metadata for one exact version AND checks that version against OSV.dev for vulnerabilities. It explicitly scopes the tool to 'one exact version' and contrasts it with 'the latest release', which separates it from get_package and the bulk query siblings.

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?

'Use this to check a version pinned in a lockfile rather than the latest release' gives a clear when-to-use condition and implies the alternative to get_package. It stops short of naming a sibling tool explicitly or stating when NOT to use it (e.g. for ranges), though the schema note about unsupported semver ranges partially covers that.

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