Skip to main content
Glama

Compare npm packages side-by-side

compare_packages
Read-only

Given 2-5 candidate packages for the same job (e.g. "axios vs got vs node-fetch"), fetches the same registry/popularity/maintenance/vulnerability enrichment get_package computes for each one in parallel and returns a structured side-by-side plus a deterministic, reasoned pick. Each candidate gets downloads + trend, popularityTier/maintenanceTier, GitHub stars, TypeScript support, license, deprecated status, latest-version vulnerability status, a lightweight installScriptRisk signal (scans lifecycle script command strings for known red flags — does NOT fetch the tarball; call analyze_install_script on a specific candidate for that deeper scan), and installSize (the candidate's own dist.unpackedSize plus a transitive rollup — summed dist.unpackedSize across its resolved dependency tree, walked up to depth 2 / 60 nodes per candidate; installSize.transitive.truncated/sizeUnknownCount flag when that sum is partial rather than pretending it's exact — call analyze_transitive_dependencies on a specific candidate for the full graph). differentiators names which candidates stand out on each dimension (most downloads, only ones with TS types, which are deprecated/vulnerable/flagged as a typosquat/install-script risk, smallest/largest install size). recommendation.pick is chosen deterministically from a weighted score (popularity, maintenance, deprecation, vulnerabilities, typosquat flag, install-script risk, TS support, GitHub stars — install size is reported but not scored) — never a deprecated or typosquat-flagged candidate — with rationale explaining why and confidence reflecting how close the top two scored. A name that can't be resolved (typo, unpublished, malformed) still appears in candidates with found:false and resolutionError set rather than failing the whole call; duplicate names in the input are rejected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packagesYes2-5 exact npm package names to compare, e.g. ["axios", "got", "node-fetch"].

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
candidatesYes
recommendationYes
differentiatorsYes

Schema Changelog

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

  1. 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"
      +]
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnlyHint and openWorldHint annotations, the description discloses substantial behavior: fetches happen in parallel, installScriptRisk does NOT fetch the tarball, installSize transitive rollup is truncated with explicit flags, unresolved names appear with found:false rather than failing, and duplicate names are rejected. It also explains the deterministic scoring and exclusion of deprecated/typosquat candidates. This far exceeds annotation coverage and contradicts nothing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense and heavily nested, with long parentheticals and dash-separated caveats (e.g., the installSize transitive rollup explanation). It is front-loaded with the core purpose and every clause carries information, but the prose would benefit from shorter sentences and better paragraph breaks for readability.

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, the description is remarkably complete: it covers error handling for unresolved names, duplicate rejection, dependency-tree truncation behavior, scoring weights, exclusions, and routing to deeper tools. Since an output schema exists, the lack of specific return-value details is acceptable. An agent has enough context to invoke this tool correctly in most scenarios.

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?

The single parameter 'packages' already has a descriptive schema comment with examples, so baseline is 3. The description adds extra semantic nuance: candidates should be 'for the same job' and duplicate names are rejected. These details are not present in the schema and help the agent use the parameter correctly.

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?

The description opens with a specific verb and resource: it compares 2-5 npm packages side-by-side and returns a structured comparison plus a reasoned pick. It distinguishes itself from siblings like analyze_install_script and analyze_transitive_dependencies by explicitly scoping its purpose to comparison rather than deep single-package analysis.

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?

It provides clear context by stating it is for candidates 'for the same job' and explicitly points to alternatives: 'call analyze_install_script on a specific candidate for that deeper scan' and 'call analyze_transitive_dependencies on a specific candidate for the full graph'. However, it never explicitly says when NOT to use this tool, such as 'use get_package for a single package', so it lacks a full when-not dimension.

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