Skip to main content
Glama
kongyo2

@kongyo2/npm-info-mcp-server

Get npm Package Dependencies

npm_package_dependencies
Read-onlyIdempotent

Retrieve direct or transitive dependencies of an npm package. Returns summary counts, dependency lists by category, and an ASCII tree for production dependencies up to depth 5.

Instructions

Get dependency information for a specific version of an npm package.

By default returns direct dependencies of all kinds (dependencies, devDependencies, peerDependencies, optionalDependencies) along with totals. When depth is greater than 1, resolves the transitive production dependency tree (using the abbreviated packument format and a bounded fetch limiter) and renders it as an ASCII tree with deduplicated nodes.

Args:

  • package_name (string): The npm package name

  • version (string, optional): Specific version to check (defaults to latest)

  • depth (number, optional, 1-5): Transitive production-dep depth (default 1)

  • include_dev (boolean, optional): Include devDependencies (default true; ignored when depth > 1)

  • include_peer (boolean, optional): Include peerDependencies (default true; ignored when depth > 1)

  • include_optional (boolean, optional): Include optionalDependencies (default true; ignored when depth > 1)

Returns:

  • Counts summary (runtime/dev/peer/optional)

  • Direct dependency lists by category

  • When depth > 1: a transitive production-dep tree, deduplicated on resolved version

Examples:

  • "express" -> Express direct dependencies at latest

  • "react", version="18.2.0" -> React 18.2.0 dependencies

  • "express", depth=2 -> Express + its production deps' dependencies

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNoResolve transitive production dependencies up to this depth (1-5, default: 1). Higher depths fetch more packages and take longer.
versionNoSpecific version to check (default: latest). Use npm_package_versions to find available versions.
include_devNoInclude devDependencies (default: true). Ignored when depth > 1.
include_peerNoInclude peerDependencies (default: true). Ignored when depth > 1.
package_nameYesnpm package name
include_optionalNoInclude optionalDependencies (default: true). Ignored when depth > 1.
Behavior5/5

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

Discloses behavioral details beyond annotations: uses abbreviated packument format, bounded fetch limiter, renders ASCII tree with deduplication. Explains side effects of depth on include flags. No contradiction with annotations (readOnly, idempotent, etc.).

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?

Well-structured with Args, Returns, Examples sections. Every sentence adds value. Front-loaded with main purpose. No fluff.

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?

No output schema, but description explains return format thoroughly (counts summary, direct lists, tree). Covers all aspects given complexity. Provides examples. Complete for agent understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but description adds significant meaning: explains each parameter's purpose, default values, and interactions. For example, include_dev is ignored when depth>1. Examples show usage. Goes well beyond schema.

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 'Get dependency information for a specific version of an npm package' with specific verb and resource. It distinguishes from siblings like npm_package_info and npm_package_versions by focusing on dependencies and transitive trees.

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?

Provides clear context on when to use depth and explains that include flags are ignored when depth>1. Includes examples like 'express', depth=2. Could explicitly mention alternatives for version listing but is sufficient.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kongyo2/npm-info'

If you have feedback or need assistance with the MCP directory API, please join our Discord server