Skip to main content
Glama

Query known vulnerabilities for a package

query_vulnerabilities
Read-only

Query OSV.dev for known vulnerabilities affecting an npm package, optionally scoped to one exact version (e.g. to check whether a version pinned in a lockfile is safe). Returns isVulnerable and highestSeverity as a direct answer, plus each finding's severity, a plain-language summary, CVE aliases, and the fixedVersion to upgrade to — not a raw advisory dump. Use before recommending, installing, or upgrading a package.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesnpm package name
versionNoOptional exact version to narrow results, e.g. to check one version pinned in a lockfile
ecosystemNoOSV ecosystem, default "npm"

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
packageYes
versionYes
npmscanUrlYes
isVulnerableYes
highestSeverityYes
vulnerabilitiesYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed16 schema fields changed
    • changedInput schema / properties / version / description
      Previous value: -"Optional exact version to narrow results"New value: +"Optional exact version to narrow results, e.g. to check one version pinned in a lockfile"
    • addedOutput schema / properties / highestSeverity
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / isVulnerable
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / version
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / vulnerabilities / items / additionalProperties
      Previous value: -trueNew value: +false
    • removedOutput schema / properties / vulnerabilities / items / properties / details
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / vulnerabilities / items / properties / fixedVersion
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • removedOutput schema / properties / vulnerabilities / items / properties / modified
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / vulnerabilities / items / properties / published
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / vulnerabilities / items / properties / publishedAt
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • removedOutput schema / properties / vulnerabilities / items / properties / references
      Removed value: -{
      -  "items": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "type": {
      -        "type": "string"
      -      },
      -      "url": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "url"
      -    ],
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • removedOutput schema / properties / vulnerabilities / items / properties / severity / items
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "score": {
      -      "type": "string"
      -    },
      -    "type": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "type",
      -    "score"
      -  ],
      -  "type": "object"
      -}
    • changedOutput schema / properties / vulnerabilities / items / properties / severity / type
      Previous value: -"array"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / vulnerabilities / items / properties / summary / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / vulnerabilities / items / required
      Previous value: -[
      -  "id"
      -]New value: +[
      +  "id",
      +  "summary",
      +  "severity",
      +  "aliases",
      +  "publishedAt",
      +  "fixedVersion",
      +  "npmscanUrl"
      +]
    • changedOutput schema / required
      Previous value: -[
      -  "package",
      -  "npmscanUrl",
      -  "vulnerabilities"
      -]New value: +[
      +  "package",
      +  "version",
      +  "npmscanUrl",
      +  "isVulnerable",
      +  "highestSeverity",
      +  "vulnerabilities"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "npmscanUrl": {
      +      "type": "string"
      +    },
      +    "package": {
      +      "type": "string"
      +    },
      +    "vulnerabilities": {
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "aliases": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "details": {
      +            "type": "string"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "modified": {
      +            "type": "string"
      +          },
      +          "npmscanUrl": {
      +            "type": "string"
      +          },
      +          "published": {
      +            "type": "string"
      +          },
      +          "references": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "type": {
      +                  "type": "string"
      +                },
      +                "url": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "url"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "severity": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "score": {
      +                  "type": "string"
      +                },
      +                "type": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "type",
      +                "score"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "summary": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "package",
      +    "npmscanUrl",
      +    "vulnerabilities"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.5/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 safety profile is covered. The description adds meaningful behavioral context beyond annotations: it queries an external service, returns a distilled answer rather than raw data, and specifies the output fields including fixedVersion, CVE aliases, and plain-language summaries. This is substantial transparency for a read-only tool.

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

Conciseness5/5

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

The description is two sentences with no filler. It front-loads the core action and scope, then delivers high-value output and usage context. Every sentence 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?

Given the rich schema, existing output schema, and annotations, the description adds exactly what is missing: when to use it, what the returned answer looks like, and the key distinction that it is not a raw advisory dump. Nothing needed for safe invocation 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%, so parameter semantics are already fully documented in the schema. The description adds a helpful real-world example (lockfile pin check) and reinforces that version is optional, but it does not carry the parameter-documentation burden. 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?

The description states a specific verb and resource: querying OSV.dev for known vulnerabilities affecting an npm package. It further distinguishes itself from a raw advisory dump by promising a direct isVulnerable/highestSeverity answer, and its exact-version scoping differentiates it from broader advisory tools like get_latest_advisories.

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?

The description gives clear context for when to use the tool: 'Use before recommending, installing, or upgrading a package,' and provides a concrete use case for checking a lockfile-pinned version. However, it does not explicitly mention the sibling batch_query_vulnerabilities or state when not to use this tool, so it stops short of full exclusion 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.

TDQS

A4.4/5.0
Disambiguation4/5

Most tools target a distinct part of the supply-chain lifecycle, and the detailed descriptions include explicit cross-references that reduce misselection. The main ambiguity is among the vulnerability-lookup tools—especially get_latest_advisories and get_cve, which both accept CVE IDs, and query_vulnerabilities versus batch_query_vulnerabilities, which differ mainly in input shape.

Naming Consistency5/5

Every tool name uses lowercase snake_case with a leading imperative verb or verb phrase: analyze_, audit_, batch_query_, check_, compare_, diff_, get_, prioritize_, query_, search_, and suggest_. The check_* tools form a consistent sub-family, and there are no camelCase or noun-only strays.

Tool Count4/5

18 tools is on the high side, so the server feels slightly heavy rather than lean. However, the domain is broad enough that each tool occupies a meaningful workflow step—metadata lookup, vulnerability querying, transitive analysis, license/maintainer/provenance checks, repo auditing, diffing, and remediation—so the count is still reasonable for a comprehensive npm security server.

Completeness5/5

The surface covers the full npm supply-chain audit workflow: discovery, exact-version and lockfile vulnerability checks, transitive dependency resolution, install-script deep scans, license compliance, maintainer and provenance history, repo-level audits, dependency diffs, remediation prioritization, and alternative suggestions. There are no obvious dead ends, and the tools consistently point to natural follow-up actions.

Resources