Skip to main content
Glama
YawLabs

@yawlabs/npmjs-mcp

by YawLabs

npm_dep_tree

Read-onlyIdempotent

Resolve the full production dependency tree for any npm package version, showing transitive dependencies with versions up to a configurable depth.

Instructions

Resolve the production dependency tree for a package version (up to a configurable depth). Shows the full transitive dependency graph with versions. Issues one registry request per discovered package (10 in flight), so a wide tree at depth 4-5 can take a while; the walk is capped at 60s and returns truncated: true with a warning if it runs out of budget.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesPackage name
depthNoMax tree depth where the root counts as level 1 (default 3 = root + 2 transitive levels, max 5)
versionNoSemver version or dist-tag (default: 'latest')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.2

TDQS

A4.3/5.0
Behavior5/5

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

The description goes well beyond the readOnly/idempotent annotations by disclosing rate-limit behavior ('10 in flight'), performance expectations ('wide tree at depth 4-5 can take a while'), a hard time cap ('60s'), and the truncated result flag with warning. This is exactly the kind of behavioral detail an agent needs to anticipate long-running or incomplete calls.

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?

Two sentences deliver the core purpose and a critical performance caveat in a compact, front-loaded manner. Every clause earns its place: what the tool does, how it behaves, and what to expect on timeout. No filler or redundancy.

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 absence of an output schema, the description still explains the main return signal ('truncated: true') and warns about timeouts. It covers the essential operational context (registry requests, concurrency, depth limits) so an agent can decide whether to invoke it and how to set depth. No critical missing context for calling this tool.

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?

The input schema already documents all three parameters comprehensively (name, depth, version), achieving 100% coverage. The description adds minimal new parameter meaning beyond the schema, only reiterating depth as configurable and mentioning the root-counting convention that is already in the schema. 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 clearly states the verb ('Resolve') and the exact resource ('production dependency tree for a package version'), and explicitly mentions the output ('full transitive dependency graph with versions'). It distinguishes itself from many sibling npm tools by focusing on the recursive tree structure rather than a single package or metadata lookup.

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?

The description implies when to use it (when a transitive dependency tree is needed) but does not explicitly state when not to use it or which sibling tool is an alternative (e.g., npm_dependencies for a flat list). It gives context about depth limits and performance trade-offs, but no explicit exclusion guidance.

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