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

Schema Changelog

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

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, and the description is consistent with both. It adds substantial behavioral context beyond annotations: per-branch semver max-satisfying resolution rather than npm/yarn hoisting/dedup emulation, only the dependencies field being followed, unresolvable git/file/URL deps surfacing as resolutionError instead of being skipped, a total node budget requiring checks of truncated/truncationNote, and a deterministic summary field to read first.

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 long but every section earns its place: mechanics with defaults, guidance on which output fields to read first, four material limitations that affect how results must be interpreted, and a routing sentence to the sibling tool. It is front-loaded with the core verb and resource, and the caveats are organized so an agent can parse them in dependency order.

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?

For a complex tool with recursive traversal, semver range resolution, and an external vulnerability-checking service, the description is complete: it covers defaults, caps, unsupported dependency types, truncation behavior, result-field semantics, and the sibling alternative. The output schema exists so return values need not be restated, yet the description still explains the three most important fields (summary, vulnerablePaths, nodes) for correct result interpretation.

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; the description adds value on top by explaining how packages and version ranges actually behave: ranges are "resolved independently per branch via semver max-satisfying against published versions," maxDepth reflects how many levels beyond roots are expanded, and the 0-level meaning is clarified in the schema. It also gives the reason for the maxDepth cap (registry call bounds and timeout), which the schema's bare maximum does not convey.

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: it "recursively resolves one or more direct/root packages' dependency graphs" and "batch-checks every resolved package@version against OSV.dev." It also distinguishes itself from siblings by explaining the graph-walking scenario it is uniquely suited for and explicitly naming batch_query_vulnerabilities as the alternative for flat-list checks.

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 routes to the alternative: "Prefer batch_query_vulnerabilities instead when you only need to check exact packages you already have a flat list for (faster, no graph walk)." It also states the when-to-use case — surfacing vulnerabilities buried several levels down that direct-dependency checking would miss — and gives concrete scope caveats an agent must know before trusting a clean result.

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 have clearly distinct scopes, such as flat vs. transitive vulnerability checks and per-package vs. GitHub-repo audits. The main ambiguity is that several tools all ultimately report OSV/NVD findings or perform install-script risk checks, though the descriptions do draw clear boundaries and include cross-references to steer selection.

Naming Consistency5/5

Every tool follows a consistent lowercase snake_case verb_noun pattern, e.g. analyze_install_script, check_maintainer_changes, prioritize_remediation. The naming is predictable and makes the action and target of each tool immediately clear.

Tool Count3/5

At 22 tools, the surface is at the heavy end of the rubric and pushes beyond the typical 3-15 well-scoped range. The tools are individually purposeful and broad in coverage, but the count is high enough that an agent faces a large decision space and several workflows that overlap or compose in complex ways.

Completeness5/5

The set covers the full npm supply-chain assessment lifecycle: discovery, metadata lookup, vulnerability scanning, transitive dependency analysis, license checks, install-script analysis, maintainer and provenance checks, SBOM generation, dependency diffs, upgrade simulation, remediation prioritization, and alternative suggestion. There are no obvious dead ends or major missing operations for the stated domain.

Resources