Skip to main content
Glama

Compare npm packages side-by-side

compare_packages
Read-only

Compare 2-5 candidate packages for the same job (e.g. "axios vs got vs node-fetch") side by side and get a deterministic pick. More than 5 names is rejected, never truncated; duplicate names are rejected. Use search_packages first if you have no shortlist.

Per candidate: downloads and trend, popularity/maintenance tiers, GitHub stars, TypeScript support, license, deprecation, latest-version vulnerabilities, a tarball-free installScriptRisk (scores preinstall/install/postinstall; a prepare-only package scores 0 since prepare never runs on install — use analyze_install_script for the deep scan), and installSize (own size plus a transitive rollup up to depth 2 / 60 nodes; truncated/sizeUnknownCount mark a partial sum).

differentiators names who stands out on each dimension. recommendation.pick comes from a weighted score (popularity, maintenance, deprecation, vulnerabilities, typosquat flag, install-script risk, TypeScript, stars; size is reported, not scored) — never a deprecated or typosquat-flagged candidate — with a rationale and a confidence from how close the top two scored.

Before trusting the result: vulnerabilityCheckFailed: true means the safe/not-safe answer is unknown, not clean; a name that cannot be resolved stays in candidates with found: false and resolutionError.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packagesYes2-5 exact npm package names to compare, e.g. ["axios", "got", "node-fetch"]. More than 5 is rejected with an error, not truncated.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
candidatesYes
recommendationYes
differentiatorsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / packages / description
      Previous value: -"2-5 exact npm package names to compare, e.g. [\"axios\", \"got\", \"node-fetch\"]."New value: +"2-5 exact npm package names to compare, e.g. [\"axios\", \"got\", \"node-fetch\"]. More than 5 is rejected with an error, not truncated."
  2. Changed2 schema fields changed
    • addedOutput schema / properties / candidates / items / properties / vulnerabilityCheckFailed
      Added value: +{
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / candidates / items / required
      Previous value: -[
      -  "name",
      -  "found",
      -  "resolutionError",
      -  "npmscanUrl",
      -  "description",
      -  "license",
      -  "latestVersion",
      -  "deprecated",
      -  "weeklyDownloads",
      -  "downloadTrend",
      -  "githubStars",
      -  "hasBuiltInTypes",
      -  "daysSinceLastPublish",
      -  "popularityTier",
      -  "maintenanceTier",
      -  "maintenanceSummary",
      -  "possibleTyposquatOf",
      -  "isLatestVersionVulnerable",
      -  "highestSeverity",
      -  "vulnerabilityCount",
      -  "installScriptRisk",
      -  "installSize",
      -  "score"
      -]New value: +[
      +  "name",
      +  "found",
      +  "resolutionError",
      +  "npmscanUrl",
      +  "description",
      +  "license",
      +  "latestVersion",
      +  "deprecated",
      +  "weeklyDownloads",
      +  "downloadTrend",
      +  "githubStars",
      +  "hasBuiltInTypes",
      +  "daysSinceLastPublish",
      +  "popularityTier",
      +  "maintenanceTier",
      +  "maintenanceSummary",
      +  "possibleTyposquatOf",
      +  "isLatestVersionVulnerable",
      +  "vulnerabilityCheckFailed",
      +  "highestSeverity",
      +  "vulnerabilityCount",
      +  "installScriptRisk",
      +  "installSize",
      +  "score"
      +]
  3. Changed5 schema fields changed
    • addedOutput schema / properties / candidates / items / properties / installSize
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "transitive": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "sizeUnknownCount": {
      +              "type": "number"
      +            },
      +            "transitiveDependencyCount": {
      +              "type": "number"
      +            },
      +            "transitiveUnpackedSize": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "truncated": {
      +              "type": "boolean"
      +            }
      +          },
      +          "required": [
      +            "transitiveUnpackedSize",
      +            "transitiveDependencyCount",
      +            "sizeUnknownCount",
      +            "truncated"
      +          ],
      +          "type": "object"
      +        },
      +        "unpackedSize": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "unpackedSize",
      +        "transitive"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / properties / candidates / items / required
      Previous value: -[
      -  "name",
      -  "found",
      -  "resolutionError",
      -  "npmscanUrl",
      -  "description",
      -  "license",
      -  "latestVersion",
      -  "deprecated",
      -  "weeklyDownloads",
      -  "downloadTrend",
      -  "githubStars",
      -  "hasBuiltInTypes",
      -  "daysSinceLastPublish",
      -  "popularityTier",
      -  "maintenanceTier",
      -  "maintenanceSummary",
      -  "possibleTyposquatOf",
      -  "isLatestVersionVulnerable",
      -  "highestSeverity",
      -  "vulnerabilityCount",
      -  "installScriptRisk",
      -  "score"
      -]New value: +[
      +  "name",
      +  "found",
      +  "resolutionError",
      +  "npmscanUrl",
      +  "description",
      +  "license",
      +  "latestVersion",
      +  "deprecated",
      +  "weeklyDownloads",
      +  "downloadTrend",
      +  "githubStars",
      +  "hasBuiltInTypes",
      +  "daysSinceLastPublish",
      +  "popularityTier",
      +  "maintenanceTier",
      +  "maintenanceSummary",
      +  "possibleTyposquatOf",
      +  "isLatestVersionVulnerable",
      +  "highestSeverity",
      +  "vulnerabilityCount",
      +  "installScriptRisk",
      +  "installSize",
      +  "score"
      +]
    • addedOutput schema / properties / differentiators / properties / largestInstallSize
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / differentiators / properties / smallestInstallSize
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / differentiators / required
      Previous value: -[
      -  "mostDownloads",
      -  "mostGithubStars",
      -  "hasTypeScriptSupport",
      -  "hasKnownVulnerabilities",
      -  "deprecated",
      -  "possibleTyposquat",
      -  "installScriptRiskFlagged"
      -]New value: +[
      +  "mostDownloads",
      +  "mostGithubStars",
      +  "hasTypeScriptSupport",
      +  "hasKnownVulnerabilities",
      +  "deprecated",
      +  "possibleTyposquat",
      +  "installScriptRiskFlagged",
      +  "smallestInstallSize",
      +  "largestInstallSize"
      +]
  4. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations cover safety (readOnly, non-destructive, open-world), and the description still adds substantial behavioral context: rejection semantics, the weighted scoring inputs, the rule that deprecated/typosquat-flagged candidates can never be picked, and confidence derived from score gap. The main caveat section on vulnerabilityCheckFailed and found:false further qualifies trust in results. It falls short of 5 only because failure/auth/rate-limit conditions beyond those two flags are not addressed.

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?

Front-loaded with purpose, constraints, and the sibling pointer in the first sentence, then organized by output concern. It is dense but each sentence carries information; the long per-candidate enumeration is the one place that could be tightened.

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?

Output schema exists, yet the description still orients the agent on the shape and trustworthiness of results (differentiators, recommendation.pick, rationale, confidence, partial installSize sums). For a single-parameter comparison tool this is more than sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the single parameter is fully documented in the schema, so baseline is 3. The description adds meaning the schema does not: duplicate names are rejected and names that cannot be resolved stay in candidates with found:false and resolutionError, which clarifies what values are acceptable and how they behave.

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?

States a specific verb and resource ('Compare 2-5 candidate packages ... side by side and get a deterministic pick') with scope (same job) and an example. It is clearly distinguishable from search_packages, which it explicitly routes to for shortlist building.

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?

Gives explicit preconditions and exclusions: 2-5 names, more than 5 rejected rather than truncated, duplicates rejected, and 'Use search_packages first if you have no shortlist.' It also names analyze_install_script as the deeper alternative for install scripts.

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.