Skip to main content
Glama

npm: package

npm_package
Read-only

Retrieves version, description, license, and homepage for an npm package by name and errors if missing; for download counts, use npmstats_downloads.

Instructions

[npm] Get the latest version, description, license and homepage of an npm package. For download counts use npmstats_downloads instead. Returns an error if the package does not exist.

Input Schema

NameRequiredDescriptionDefault
nameYesPackage name, e.g. 'express' or '@types/node'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds two pieces of non-obvious behavior beyond the annotations: it enumerates the returned fields (useful since there is no output schema) and discloses the error case when the package does not exist. It doesn't mention rate limits or whether scoped/private packages are supported.

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?

Three short sentences, front-loaded with what is returned, then the alternative, then the failure mode. No filler and no restatement of the tool name.

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, the description compensates by naming the returned fields and the error condition, which is enough for an agent to call this correctly. Minor gap: it doesn't clarify whether version history or dist-tags are included, but nothing essential is missing.

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 single 'name' parameter already documents its own format with examples ('express', '@types/node'). The description adds no syntax, casing, or scoped-package guidance beyond what the schema provides, 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) and resource (npm package) and enumerates exactly which fields come back: latest version, description, license, homepage. It also explicitly names the sibling it is not (npmstats_downloads), so an agent can route between the two without opening either 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?

Gives explicit routing guidance: 'For download counts use npmstats_downloads instead,' which resolves the most plausible sibling confusion in this tool set. It does not cover other alternatives (e.g. github_repo for source metadata), but for a single-purpose registry lookup the main exclusion is handled.

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