Skip to main content
Glama

npm Package Search

npm.packages.search
Read-onlyIdempotent

Search over 2.1 million npm packages by keyword. Returns ranked results with quality, popularity, and maintenance scores, download counts, dependents, license, and publisher. Find libraries for any task.

Instructions

Search 2.1M+ npm packages by keyword. Returns ranked results with quality, popularity, and maintenance scores, download counts, dependents, license, publisher. Find libraries for any task (e.g. "mcp server", "react hooks", "typescript orm").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (e.g. "mcp server", "react hooks", "typescript orm")
sizeNoNumber of results to return (1-20, default 10)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultNoTool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response.
errorNoPresent only when the call failed. Includes error code, message, request_id, and any provider-specific extras.
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=true, clearly indicating a safe, non-destructive, idempotent operation. The description adds value by specifying the return fields (quality, popularity, etc.) and output structure, which complements the annotations without contradiction.

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?

The description is extremely concise (two sentences) and front-loaded with the core action and scope. Every sentence serves a purpose: the first states the function and output, the second provides usage examples. No superfluous details, making it highly efficient for an AI agent.

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?

Despite lacking an output schema, the description comprehensively lists the return fields (quality, popularity, maintenance, downloads, dependents, license, publisher) and provides practical query examples. It covers all essential aspects for a search tool, including result ranking and scope, making it complete for an AI agent to understand and use.

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 provides detailed descriptions for both parameters (query and size), achieving 100% coverage. The description does not add new semantic information beyond what the schema provides; it merely echoes the query examples. Therefore, no additional value is delivered beyond the baseline expected from a well-described 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 the tool searches npm packages by keyword, and specifies the output includes ranked results with quality, popularity, and maintenance scores, download counts, dependents, license, and publisher. It effectively distinguishes from sibling tools like npm.packages.info (specific package info) and npm.packages.downloads (download stats), making the purpose unambiguous.

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 description provides explicit examples of queries ('mcp server', 'react hooks', 'typescript orm'), implying when to use this tool for keyword-based discovery. However, it does not explicitly state when not to use it (e.g., if you already know the package name) or mention alternatives among sibling tools, leaving some room for improvement.

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/whiteknightonhorse/APIbase'

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