Search npm packages
npm_packages_searchSearch npm registry packages by keywords and qualifiers, ranked by npm search score. Filter by author, maintainer, or scope and paginate results to find packages for your project.
Instructions
Search the npm registry by words and qualifiers, ranked by npm's search score; a page past the results is empty. Requires query. Returns a list (use cursor when paginated).
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>",
"context": "<context>",
"llm_model": "<llm_model>"
},
"name": "npm_packages_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | 1-based page number. The registry accepts a starting offset only up to 5000, so a page past the reachable results is an empty page. Default: 1. | |
| sort | No | Ranking: `optimal` (npm's blend), or a single component. Default: `optimal`. | |
| limit | No | Results per page, 1 to 250. Default: 20. | |
| query | Yes | Required. Search text, 2 to 64 characters. A single emoji counts as two characters. The registry's qualifiers work: `author:isaacs`, `maintainer:`, `keywords:a,b`, `not:deprecated`, `@scope`. | |
| cursor | No | Cursor from `page.nextCursor` of the previous response. It only continues the same lookup and filters. | |
| context | Yes | Describe the user's underlying goal in one sentence, not the tool you are calling. | |
| quality | No | Quality weight, 0 to 1. | |
| llm_model | Yes | The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (for example "claude-opus-4-8" or "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" and do not guess. | |
| popularity | No | Popularity weight, 0 to 1. | |
| maintenance | No | Maintenance weight, 0 to 1. | |
| conversation_id | No | Echo the conversation_id from the server's previous response. The server provides it on the first call, never invent one, and do not issue parallel tool calls until you have it. |