Skip to main content
Glama

Search npm packages

search_packages
Read-only

Search the npm registry by name or keywords. Each result includes its current weekly/monthly download counts, dependentsCount (how many other npm packages depend on it), topPackagesRank (position among npmscan's own top-100k-by-downloads snapshot — not live, but a second independent popularity signal), and deterministic (not model-generated) popularityTier/maintenanceTier labels — a package matching the query with a 'very-low' popularityTier, zero dependents, or a 'stale' maintenanceTier is very likely an abandoned, copy-paste, or squatted package, not a real contender, regardless of how relevant its name/description look. A result may also carry possibleTyposquatOf — set when its name is one typo away (e.g. 'raect' vs 'react') from a top-5,000 package while itself having very low popularity; treat that as a red flag to call out explicitly, not silently filter. Use these (not name recognition or the package's own README) to judge which candidates are actually established, and call get_package on your shortlist for install-script risk, TypeScript support, and GitHub stars before recommending one. Includes a link to each package's full npmscan.com risk/analysis page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax results to return (default 20, max 50)
queryYesSearch text, e.g. a package name or keywords

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
totalYes
resultsYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changed
    • addedInput schema / properties / query / maxLength
      Added value: +64
    • changedInput schema / properties / query / minLength
      Previous value: -1New value: +2
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "query": {
      +      "type": "string"
      +    },
      +    "results": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "dependentsCount": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "description": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "keywords": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "lastPublished": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "links": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "homepage": {
      +                "type": "string"
      +              },
      +              "npm": {
      +                "type": "string"
      +              },
      +              "repository": {
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "maintenanceTier": {
      +            "enum": [
      +              "active",
      +              "aging",
      +              "stale",
      +              "unknown"
      +            ],
      +            "type": "string"
      +          },
      +          "monthlyDownloads": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "npmscanUrl": {
      +            "type": "string"
      +          },
      +          "popularityTier": {
      +            "enum": [
      +              "very-high",
      +              "high",
      +              "moderate",
      +              "low",
      +              "very-low",
      +              "unknown"
      +            ],
      +            "type": "string"
      +          },
      +          "possibleTyposquatOf": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "name": {
      +                    "type": "string"
      +                  },
      +                  "rank": {
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "name",
      +                  "rank"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "publisher": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "topPackagesRank": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "version": {
      +            "type": "string"
      +          },
      +          "weeklyDownloads": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "version",
      +          "description",
      +          "keywords",
      +          "publisher",
      +          "lastPublished",
      +          "links",
      +          "npmscanUrl",
      +          "weeklyDownloads",
      +          "monthlyDownloads",
      +          "dependentsCount",
      +          "topPackagesRank",
      +          "popularityTier",
      +          "maintenanceTier",
      +          "possibleTyposquatOf"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "total": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "query",
      +    "total",
      +    "results"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already indicate a harmless read-only search, but the description goes well beyond them by disclosing that topPackagesRank is from a snapshot and not live, that labels are deterministic rather than model-generated, and that certain result signals indicate likely abandoned or squatted packages. It also defines the possibleTyposquatOf field semantics and how the agent should react, which is valuable behavioral context not visible in the schema.

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?

The description is long but every sentence carries operational value, especially the caveats about abandoned packages and typosquatting. It is front-loaded with the primary action and then layers interpretation and workflow guidance, though a slightly more structured format would improve scannability.

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?

Given the tool's complexity and the presence of an output schema, the description fully covers what the agent needs: what results include, how to interpret unreliable signals, how to handle typosquat flags, and what to do next (call get_package). No critical guidance 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% — both query and limit are already documented with constraints and defaults. The description adds only minor context ('by name or keywords'), which does not materially exceed the schema, so the baseline score of 3 is appropriate.

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?

Description states a specific verb ('Search') and resource ('the npm registry'), and defines what the results include. It clearly distinguishes from sibling get_package by framing search as the discovery step and get_package as the deep-dive on a shortlist.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit workflow guidance: use download counts, dependentsCount, and popularityTier/maintenanceTier instead of name recognition or README, and call get_package on the shortlist before recommending. It also tells the agent how to treat possibleTyposquatOf results, effectively specifying when to flag versus silently filter.

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.

TDQS

A4.4/5.0
Disambiguation4/5

Most tools have clearly distinct scopes, such as flat vs. transitive vulnerability checks and per-package vs. GitHub-repo audits. The main ambiguity is that several tools all ultimately report OSV/NVD findings or perform install-script risk checks, though the descriptions do draw clear boundaries and include cross-references to steer selection.

Naming Consistency5/5

Every tool follows a consistent lowercase snake_case verb_noun pattern, e.g. analyze_install_script, check_maintainer_changes, prioritize_remediation. The naming is predictable and makes the action and target of each tool immediately clear.

Tool Count3/5

At 22 tools, the surface is at the heavy end of the rubric and pushes beyond the typical 3-15 well-scoped range. The tools are individually purposeful and broad in coverage, but the count is high enough that an agent faces a large decision space and several workflows that overlap or compose in complex ways.

Completeness5/5

The set covers the full npm supply-chain assessment lifecycle: discovery, metadata lookup, vulnerability scanning, transitive dependency analysis, license checks, install-script analysis, maintainer and provenance checks, SBOM generation, dependency diffs, upgrade simulation, remediation prioritization, and alternative suggestion. There are no obvious dead ends or major missing operations for the stated domain.

Resources