Skip to main content
Glama

Agent Data Hub

npm package search

search_npm
Read-onlyIdempotent

Search the npm registry for JavaScript/TypeScript packages by keywords. Returns name, latest version, description, keywords, last publish date, publisher, license, weekly downloads, dependents count, npm and repository links and npm's quality score. Use to pick a library or check what exists before coding. Price: $0.001 per call (USDC on Base via x402); the first 10 calls per day are free.

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": {
      "query": "<query>"
    },
    "name": "search_npm"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoResults 1–25 (default 10)
queryYesKeywords, e.g. x402 client

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

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 and non-destructive behavior, so the description does not need to re-state safety. It adds genuinely new information beyond annotations: the exact return fields and a pricing/cost model ($0.001 per call, first 10 calls per day free), which materially affects an agent's decision to call it repeatedly.

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?

Three sentences, front-loaded with the core purpose, then the return payload, then usage and cost. The long enumeration of returned fields is dense but informative; nothing is redundant, though the inventory could be slightly tightened.

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 well by enumerating the return fields an agent will get. Since the input schema fully documents the two parameters and annotations cover the safety profile, the remaining gap is minor, such as ordering or pagination behavior for results.

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 description coverage is 100% and both parameters are documented in the schema, so the baseline is 3. The description only hints at query semantics with 'by keywords' and adds nothing about the limit parameter's range or default beyond what the schema already states.

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 opens with a specific verb and resource: 'Search the npm registry for JavaScript/TypeScript packages by keywords.' The npm-registry scope clearly separates it from the other search_* siblings, which target arxiv, github, pubmed and similar sources.

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?

'Use to pick a library or check what exists before coding' gives clear usage context for the agent. There is no explicit when-not guidance or named alternative (e.g. a package-reference sibling for fetching docs once a package is chosen), so it stops short of a 5.

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.

Resources