Skip to main content
Glama

scan_lockfile

Scan composer.lock or package-lock.json dependencies for known vulnerabilities, check every package against OSV.dev, and rank findings by exploitation urgency.

Instructions

Scan a project's dependencies for known vulnerabilities in one go: takes a composer.lock or package-lock.json, checks every installed package against OSV.dev (GitHub advisories, Packagist/npm advisories, malicious packages), and ranks findings most urgent first. Pass path (project folder or lockfile), or the lockfile text in content with filename. Each result includes exploited (listed in CISA's Known Exploited Vulnerabilities = attacked in the wild now) and epss (FIRST probability of exploitation in the next 30 days, 0-1).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "scan_lockfile"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoAbsolute path to a project folder, or to a composer.lock / package-lock.json file
contentNoFull text of the lockfile
filenameNoWhich lockfile `content` is
includeDevNoAlso scan dev-only dependencies

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does reasonably well: it names the data sources (OSV.dev, GitHub advisories, Packagist/npm advisories, malicious packages) and discloses the ranking behavior ('most urgent first'). It does not state whether the call is read-only/network-bound, what permissions or rate limits apply, or the result envelope shape, so some behavioral gaps remain.

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?

Two sentences, front-loaded with purpose and mode selection, with no filler. The parenthetical expansions of OSV sources and the CISA/EPSS definitions are dense but earn their place by making findings interpretable; a slightly tighter phrasing would reach 5.

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

Completeness4/5

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

For a four-parameter, no-output-schema tool, the description covers purpose, both input modes, scan scope (dev dependencies are in the schema), and the meaning of the two key result fields. It leaves out whether the scan is read-only/remote and what the result list looks like beyond exploited/epss, which is a minor but real gap.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds genuine meaning the schema cannot express: it presents path and content+filename as alternative input modes, clarifying an either/or relationship the schema does not encode (no oneOf, zero required params). It also decodes the non-parameter output fields exploited and epss so results can be interpreted.

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 opens with a specific verb+resource ('Scan a project's dependencies for known vulnerabilities') and immediately narrows the scope to lockfile-wide scanning of 'every installed package', which clearly distinguishes it from the single-package sibling check_package and the CVE-lookup siblings get_cve/search_cves.

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

Usage Guidelines3/5

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

It gives operational guidance on how to invoke the two input modes ('Pass path ... or the lockfile text in content with filename'), which implies when the tool is applicable (you have a lockfile). However, it never explicitly states when to prefer this over check_package or search_cves, and offers no exclusions or prerequisites.

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

Deploy Server

Other Tools