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.8/5.0
Behavior5/5

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

Annotations only declare read-only, non-destructive, open-world behavior; the description adds substantial disclosure: parallel fetching, deterministic weighted scoring, never picking deprecated/typosquat-flagged candidates, unresolved names returned as found:false instead of failing, duplicate rejection, and transparent truncation flags on transitive size. No contradictions with annotations.

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?

Long but dense; every clause adds a distinct behavioral or output detail relevant to correct invocation (truncation flags, no tarball fetch, scoring exclusions, edge cases). The purpose is front-loaded and the nested clarifications are organized, though the parenthetical-heavy style makes it slightly harder to scan.

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 usage, edge cases (unresolved, duplicates, truncation), scoring logic, and pointers to deeper tools; with annotations and an output schema present, nothing needed for safe/correct invocation is missing. It even explains what the tool deliberately does not do, such as fetching the tarball.

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 schema already documents the single packages array with counts and an example; the description adds semantic constraints not in the schema: candidates should be for the same job, duplicate names are rejected, and unresolved names still appear with resolutionError. This goes beyond the baseline, though a 5 isn't warranted because the single parameter is already well covered by the schema.

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 npm packages side-by-side') and enumerates the enrichment dimensions (popularity, maintenance, vulnerabilities, etc.). It is clearly distinguished from siblings by the side-by-side comparison intent and explicitly references get_package and analyze_* tools for adjacent functionality.

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?

Clearly targets 2-5 candidate packages for the same job, which defines the appropriate context. It names analyze_install_script and analyze_transitive_dependencies as alternatives when deeper or full-graph analysis is needed, and references get_package as the single-package computation baseline.

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 target a distinct part of the supply-chain lifecycle, and the detailed descriptions include explicit cross-references that reduce misselection. The main ambiguity is among the vulnerability-lookup tools—especially get_latest_advisories and get_cve, which both accept CVE IDs, and query_vulnerabilities versus batch_query_vulnerabilities, which differ mainly in input shape.

Naming Consistency5/5

Every tool name uses lowercase snake_case with a leading imperative verb or verb phrase: analyze_, audit_, batch_query_, check_, compare_, diff_, get_, prioritize_, query_, search_, and suggest_. The check_* tools form a consistent sub-family, and there are no camelCase or noun-only strays.

Tool Count4/5

18 tools is on the high side, so the server feels slightly heavy rather than lean. However, the domain is broad enough that each tool occupies a meaningful workflow step—metadata lookup, vulnerability querying, transitive analysis, license/maintainer/provenance checks, repo auditing, diffing, and remediation—so the count is still reasonable for a comprehensive npm security server.

Completeness5/5

The surface covers the full npm supply-chain audit workflow: discovery, exact-version and lockfile vulnerability checks, transitive dependency resolution, install-script deep scans, license compliance, maintainer and provenance history, repo-level audits, dependency diffs, remediation prioritization, and alternative suggestions. There are no obvious dead ends, and the tools consistently point to natural follow-up actions.

Resources