Skip to main content
Glama

Analyze transitive dependencies for vulnerabilities

analyze_transitive_dependencies
Read-only

Recursively resolves one or more direct/root packages' dependency graphs — e.g. the "dependencies" section of a package.json — up to maxDepth levels deep (default 2, max 3) and batch-checks every resolved package@version against OSV.dev, so vulnerabilities buried several levels down (which would never show up from checking direct dependencies alone) still surface. summary is a one-sentence, deterministic recap (packages scanned, unresolved count, vulnerable count and which roots pulled them in) — read it first. The vulnerablePaths field directly answers "which of my dependencies pulled this in" by naming the root package(s) responsible for each vulnerable transitive package; nodes has the full resolved graph (depth, parents, resolutionError) for deeper inspection. Scope/limits worth knowing before trusting a "clean" result: only the "dependencies" field is followed (not devDependencies/peerDependencies/optionalDependencies); each range is resolved independently per branch via semver max-satisfying against published versions — this does NOT emulate npm/yarn's actual node_modules hoisting/dedup, so read results as "which vulnerable versions are reachable in the graph," not the exact installed layout; git/file/workspace/URL/npm-alias dependencies aren't resolvable from the registry and show up with a resolutionError instead of being silently skipped; and the whole traversal is capped at a total node budget — check truncated/truncationNote rather than assuming a large graph was scanned exhaustively. Prefer batch_query_vulnerabilities instead when you only need to check exact packages you already have a flat list for (faster, no graph walk).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxDepthNoHow many levels of transitive dependencies to expand beyond the given root packages (0 = only check the roots themselves). Default 2, capped at 3 to bound registry calls and stay within the request timeout.
packagesYes1-15 direct/root packages to expand from, e.g. a package.json's "dependencies". version accepts an exact version or a semver range like "^4.17.21"; omitted = latest.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodesYes
rootsYes
summaryYes
maxDepthYes
truncatedYes
enrichmentNoteYes
truncationNoteYes
unresolvedCountYes
vulnerablePathsYes
totalPackagesScannedYes
totalVulnerabilitiesYes
vulnerablePackageCountYes

TDQS

A4.8/5.0
Behavior5/5

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

The annotations already mark this as read-only, non-destructive, and open-world, and the description adds substantial behavioral detail beyond that: independent per-branch semver resolution, non-aborting resolution errors, skipped git/file: dependencies, deterministic summary output, and what vulnerablePaths/nodes contain. No contradiction with annotations exists.

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 long but front-loaded: the first sentence establishes the core operation, then output-field guidance, then critical scope limits, then the alternative tool. It is structured logically and nearly every sentence earns its place, though there is minor redundancy around file: dependencies being skipped and the paragraph is dense.

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 output schema exists and the annotations cover safety, the description is remarkably complete. It tells the agent how to read the summary first, what vulnerablePaths answers, what nodes offers for deep inspection, what the resolver does and does not follow, and when to choose a sibling tool instead. Nothing essential for correct invocation is missing.

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 high and the schema already documents maxDepth defaults and packages ranges, so the baseline is 3. The description adds useful parameter behavior by explaining that each version range is resolved independently per branch via npm's resolver, which can yield multiple versions of the same package, and clarifies that packages are roots for expansion, not a flat list to check.

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 a specific verb (recursively resolves), a resource (dependency graphs of direct/root packages), and an action (batch-checks resolved packages against OSV.dev). It also distinguishes itself from the sibling batch_query_vulnerabilities by emphasizing the graph-walk approach and deep, buried vulnerabilities.

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 explicitly tells the agent when to prefer batch_query_vulnerabilities instead: when checking exact packages already available as a flat list, since that is faster and avoids graph walking. It also documents limitations that affect trust in a 'clean' result, such as only following 'dependencies' and not dev/peer/optional dependencies.

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.3/5.0
Disambiguation4/5

Each tool targets a distinct workflow—install script analysis, transitive dependency resolution, batch OSV queries, provenance verification, CVE lookup, advisory browsing, package metadata, exact-version checks, single-package vuln checks, and search. The only mild overlap is that several get_/query_ tools return vulnerability data, but the descriptions clearly delineate when to use each.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern: get_package, query_vulnerabilities, analyze_transitive_dependencies, check_package_provenance, etc. There are no mixed casing styles or vague verbs, making the set highly predictable.

Tool Count5/5

10 tools is well-scoped for an npm security scanning server. Each tool earns its place by covering a distinct facet of the domain without redundancy or bloat.

Completeness4/5

The surface covers package discovery, metadata, exact-version vulnerability checks, batch scanning, transitive graph analysis, install-script heuristics, provenance, advisories, and CVE enrichment. Minor gaps remain—e.g. no full tarball code review and maintainer-history red flags are explicitly out of scope—but core agent workflows are covered.

Resources