Skip to main content
Glama

Named Package Comparison

compare_competitors
Read-onlyIdempotent

Compare two or more exact npm or PyPI packages side by side using live registry metadata to verify claims about age, maintenance, and licenses.

Instructions

Compare two or more exact package names side by side using live npm or PyPI metadata. Use this when you already know the candidate packages and need evidence for claims such as 'tool A is newer', 'tool B is still maintained', or 'these packages use different licenses'. It returns per-package registry metadata in input order, with field availability varying by registry. Missing or unpublished packages return found=false. Do not use it to discover unknown alternatives, estimate market size, or compare packages across different registries. Registry responses are cached for 5 minutes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packagesYesTwo to ten exact package names from the same registry, for example ['react', 'vue']. Use exact registry names, not search phrases or categories.
registryNoRegistry that all package names belong to. All compared packages must come from the same registry, and returned metadata fields differ slightly between npm and PyPI.npm

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
packagesYesPackage names that were requested for comparison.
registryYesRegistry used for all comparisons.
comparisonsYesPer-package lookup results returned in the same order as the input package list. Some fields only exist for npm or only for PyPI, so consumers should treat absent fields as normal.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.0
    • changedInput schema / properties / packages / description
      Previous value: -"Two to ten exact package names from the same registry, for example ['react', 'vue']."New value: +"Two to ten exact package names from the same registry, for example ['react', 'vue']. Use exact registry names, not search phrases or categories."
    • changedInput schema / properties / registry / description
      Previous value: -"Registry that all package names belong to. All compared packages must come from the same registry."New value: +"Registry that all package names belong to. All compared packages must come from the same registry, and returned metadata fields differ slightly between npm and PyPI."
    • changedOutput schema / properties / comparisons / description
      Previous value: -"Per-package lookup results returned in the same order as the input package list."New value: +"Per-package lookup results returned in the same order as the input package list. Some fields only exist for npm or only for PyPI, so consumers should treat absent fields as normal."
  2. Changed4 schema fields changedv0.1.1
    • changedInput schema / properties / packages / description
      Previous value: -"Package names to compare (e.g. ['express', 'fastify', 'koa'])"New value: +"Two to ten exact package names from the same registry, for example ['react', 'vue']."
    • addedInput schema / properties / packages / items / minLength
      Added value: +1
    • addedInput schema / properties / registry / description
      Added value: +"Registry that all package names belong to. All compared packages must come from the same registry."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "comparisons": {
      +      "description": "Per-package lookup results returned in the same order as the input package list.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "author": {
      +            "description": "Package author when PyPI metadata includes one.",
      +            "type": "string"
      +          },
      +          "cached": {
      +            "description": "True when the lookup came from the 5-minute cache.",
      +            "type": "boolean"
      +          },
      +          "created": {
      +            "description": "Package creation timestamp when npm provides one.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "description": {
      +            "description": "Short package summary from the registry.",
      +            "type": "string"
      +          },
      +          "error": {
      +            "description": "Fetch error when registry metadata could not be retrieved for this package.",
      +            "type": "string"
      +          },
      +          "found": {
      +            "description": "True when the registry lookup succeeded and returned package metadata.",
      +            "type": "boolean"
      +          },
      +          "keywords": {
      +            "description": "Registry keywords or tags associated with the package.",
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "lastPublished": {
      +            "description": "Publish timestamp of the latest version when npm provides one.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "latestVersion": {
      +            "description": "Latest package version known to the registry.",
      +            "type": "string"
      +          },
      +          "license": {
      +            "description": "Package license metadata when provided by the registry.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "name": {
      +            "description": "Package name that was looked up.",
      +            "type": "string"
      +          },
      +          "totalVersions": {
      +            "description": "Number of published versions when npm metadata includes a version history.",
      +            "minimum": 0,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "found"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "packages": {
      +      "description": "Package names that were requested for comparison.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "registry": {
      +      "description": "Registry used for all comparisons.",
      +      "enum": [
      +        "npm",
      +        "pypi"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "packages",
      +    "registry",
      +    "comparisons"
      +  ],
      +  "type": "object"
      +}
  3. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Adds substantial context beyond annotations: 'returns per-package registry metadata in input order, with field availability varying by registry. Missing or unpublished packages return found=false. Registry responses are cached for 5 minutes.' This enriches the readOnly/idempotent/openWorld hints with specific behavior.

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?

Four sentences, each packed with distinct value: core action, use cases, return/missing behavior, caching. No fluff or repetition; every sentence earns its place.

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?

Covers all essential context: what it does, when to use, when not to use, output behavior, and caching. With a rich output schema and strong annotations, the description is fully complete for the tool's complexity.

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%: both packages and registry are already well-described in the schema. The description only reinforces 'exact package names' without adding meaningfully new parameter-level information, so baseline 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?

Clearly states the verb and resource: 'Compare two or more exact package names side by side using live npm or PyPI metadata.' It also differentiates from siblings by explicitly saying 'Do not use it to discover unknown alternatives,' which distinguishes it from tools like estimate_market.

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 positive conditions ('Use this when you already know the candidate packages and need evidence for claims...') and negative exclusions ('Do not use it to discover unknown alternatives, estimate market size, or compare packages across different registries'), effectively guiding tool selection without needing to read sibling names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.