Skip to main content
Glama
mcp-server-npm-registry

mcp-server-npm-registry

Get npm package info

get_package_info
Read-onlyIdempotent

Retrieve metadata for a specific npm package from the official npm registry, including version, license, repository, dependencies, TypeScript support, module type, and unpacked size.

Instructions

Get metadata for an npm package from the official npm registry: latest (or specified) version, description, license, repository, keywords, maintainers, dependencies, peer dependencies, dist-tags, TypeScript types support, module type (ESM/CommonJS), Node engine range and unpacked size. Use this when you need facts about one specific package.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "package_name": "<package_name>"
    },
    "name": "get_package_info"
  }
}

Input Schema

NameRequiredDescriptionDefault
versionNoExact version (e.g. "18.2.0") or dist-tag (e.g. "next"). Defaults to "latest".
package_nameYesnpm package name, e.g. "react" or "@types/node".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, open-world behavior, so the description gets credit for what it adds: the authoritative data source (official npm registry), the default version resolution to 'latest', and a full enumeration of returned metadata. It omits failure behavior such as unknown package names or rate limiting, which is the main residual gap.

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, purpose first with usage second, no filler. The long field enumeration is justified only because no output schema exists, though it could be tightened slightly by grouping related fields.

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?

With no output schema, enumerating the returned fields is the essential compensating detail and it is done thoroughly. For a simple two-parameter read tool this is nearly complete; only error/not-found behavior is unaddressed.

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?

Schema coverage is 100%, and the schema already documents both package_name and version with examples and defaults. The description only alludes to 'latest (or specified) version' without adding format or dist-tag detail beyond what the schema states, so the 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?

States a specific verb (get metadata) and resource (an npm package from the official registry), and scopes it to 'one specific package', which implicitly separates it from search_packages and the stats/vulnerability siblings. An agent knows exactly what this returns without opening the schema.

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?

The closing sentence gives a clear use condition ('when you need facts about one specific package'), which rules out bulk/search use cases. It stops short of naming an alternative tool or stating exclusions explicitly, so it is strong context rather than full routing guidance.

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