Skip to main content
Glama

Search Packages

search_packages
Read-onlyIdempotent

Search npm for packages by keyword. Returns package names, descriptions, latest versions, publish dates, and publishers. Use when discovering libraries for a task.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return (default 10, max 50)
queryYesSearch query string

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
totalYesTotal number of matching packages in the registry
packagesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "query": "http server framework"
      +  },
      +  {
      +    "limit": 20,
      +    "query": "data validation"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "packages": {
      +      "items": {
      +        "properties": {
      +          "date": {
      +            "description": "Publication date",
      +            "type": "string"
      +          },
      +          "description": {
      +            "description": "Package description or null",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "homepage": {
      +            "description": "Homepage URL or null",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "keywords": {
      +            "description": "Associated keywords",
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "name": {
      +            "description": "Package name",
      +            "type": "string"
      +          },
      +          "publisher": {
      +            "description": "Publisher username or null",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "score": {
      +            "description": "Search relevance score (0-1 scale)",
      +            "type": "number"
      +          },
      +          "version": {
      +            "description": "Latest package version",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "description",
      +          "version",
      +          "date",
      +          "publisher",
      +          "keywords",
      +          "homepage",
      +          "score"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "total": {
      +      "description": "Total number of matching packages in the registry",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "total",
      +    "packages"
      +  ],
      +  "type": "object"
      +}
  2. Changed2 schema fields changed
    • removedInput schema / examples
      Removed value: -[
      -  {
      -    "name": "requests"
      -  },
      -  {
      -    "name": "numpy"
      -  }
      -]
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "author": {
      -      "description": "Package author name",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "author_email": {
      -      "description": "Package author email",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "home_page": {
      -      "description": "Package homepage URL",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "keywords": {
      -      "description": "Package keywords",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "latest_files": {
      -      "description": "Latest distribution files",
      -      "items": {
      -        "properties": {
      -          "filename": {
      -            "description": "Distribution filename",
      -            "type": "string"
      -          },
      -          "packagetype": {
      -            "description": "Package type (e.g., sdist, bdist_wheel)",
      -            "type": "string"
      -          },
      -          "upload_time": {
      -            "description": "Upload timestamp",
      -            "type": "string"
      -          },
      -          "url": {
      -            "description": "Download URL",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "filename",
      -          "packagetype",
      -          "upload_time",
      -          "url"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "license": {
      -      "description": "License type",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "name": {
      -      "description": "Package name",
      -      "type": "string"
      -    },
      -    "project_urls": {
      -      "description": "Additional project URLs",
      -      "type": "object"
      -    },
      -    "recent_versions": {
      -      "description": "Last 10 available versions",
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "requires_python": {
      -      "description": "Python version requirement",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "summary": {
      -      "description": "Short package description",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "version": {
      -      "description": "Latest version number",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "name",
      -    "version",
      -    "summary",
      -    "author",
      -    "author_email",
      -    "license",
      -    "requires_python",
      -    "home_page",
      -    "project_urls",
      -    "keywords",
      -    "recent_versions",
      -    "latest_files"
      -  ],
      -  "type": "object"
      -}New value: +null
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "author": {
      +      "description": "Package author name",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "author_email": {
      +      "description": "Package author email",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "home_page": {
      +      "description": "Package homepage URL",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "keywords": {
      +      "description": "Package keywords",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "latest_files": {
      +      "description": "Latest distribution files",
      +      "items": {
      +        "properties": {
      +          "filename": {
      +            "description": "Distribution filename",
      +            "type": "string"
      +          },
      +          "packagetype": {
      +            "description": "Package type (e.g., sdist, bdist_wheel)",
      +            "type": "string"
      +          },
      +          "upload_time": {
      +            "description": "Upload timestamp",
      +            "type": "string"
      +          },
      +          "url": {
      +            "description": "Download URL",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "filename",
      +          "packagetype",
      +          "upload_time",
      +          "url"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "license": {
      +      "description": "License type",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "name": {
      +      "description": "Package name",
      +      "type": "string"
      +    },
      +    "project_urls": {
      +      "description": "Additional project URLs",
      +      "type": "object"
      +    },
      +    "recent_versions": {
      +      "description": "Last 10 available versions",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "requires_python": {
      +      "description": "Python version requirement",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "summary": {
      +      "description": "Short package description",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "version": {
      +      "description": "Latest version number",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "name",
      +    "version",
      +    "summary",
      +    "author",
      +    "author_email",
      +    "license",
      +    "requires_python",
      +    "home_page",
      +    "project_urls",
      +    "keywords",
      +    "recent_versions",
      +    "latest_files"
      +  ],
      +  "type": "object"
      +}
  4. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "name": "requests"
      +  },
      +  {
      +    "name": "numpy"
      +  }
      +]
  5. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is fully covered. The description adds the return field list, which is useful but not deeply behavioral. It does not disclose pagination, rate limits, or edge cases.

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?

Two concise sentences with all necessary information, front-loaded with the action. There is no redundant or filler content.

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?

Simple 2-param search tool with an output schema and strong annotations. The description covers what, when, and return content; nothing critical 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% with both parameters having descriptions. The description adds no parameter-specific detail beyond the schema, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it searches npm for packages by keyword and lists the returned fields. It does not explicitly contrast with sibling tools like get_package, but the search/retrieval distinction is implicit.

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 phrase 'Use when discovering libraries for a task' provides clear context for when to use this tool versus alternatives. It does not mention exclusions or name specific alternative tools, so it earns a 4 rather than 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.