Skip to main content
Glama

Suggest better-maintained npm alternatives

suggest_alternative
Read-only

Given a package that looks deprecated, vulnerable, abandoned, or suspicious, suggest better-maintained alternatives in the same category. This tool first checks the source package's own latest-version health (deprecation, latest-version OSV verdict, popularity/maintenance tiers, typosquat flag), then combines maintainer-provided deprecation hints with deterministic npm search-based category matching. It ranks candidates using category overlap plus search_packages-style popularity/maintenance signals, filters out typosquats and weak/stale contenders, and returns a short list with plain-language whySuggested notes. A candidate is also never suggested if it's deprecated, has a confirmed HIGH/CRITICAL OSV vulnerability, or its own OSV check itself failed (network/timeout/upstream outage) — an unverifiable candidate is excluded the same as a confirmed-bad one, not defaulted to 'looks fine', since this tool's entire purpose is not recommending something dangerous. Best for turning a 'don't use this package' warning into an actionable replacement shortlist. If the OSV.dev vulnerability check fails for the SOURCE package (as opposed to a candidate, which gets excluded per above), source.isLatestVersionVulnerable comes back false only because the field has to be a boolean — source.vulnerabilityCheckFailed:true is the real signal there, and means that safe/not-safe answer is unknown, not confirmed clean.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesExact npm package name, e.g. "request" or "node-sass"
limitNoMax suggestions to return (default 5, max 10)
reasonNoOptional reason to bias filtering/ranking

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonYes
sourceYes
confidenceYes
suggestionsYes
categoryTokensYes
searchedQueriesYes
nonPackageAlternativesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedOutput schema / properties / source / properties / vulnerabilityCheckFailed
      Added value: +{
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / source / required
      Previous value: -[
      -  "name",
      -  "latestVersion",
      -  "deprecated",
      -  "isLatestVersionVulnerable",
      -  "highestSeverity",
      -  "popularityTier",
      -  "maintenanceTier",
      -  "possibleTyposquatOf",
      -  "npmscanUrl"
      -]New value: +[
      +  "name",
      +  "latestVersion",
      +  "deprecated",
      +  "isLatestVersionVulnerable",
      +  "vulnerabilityCheckFailed",
      +  "highestSeverity",
      +  "popularityTier",
      +  "maintenanceTier",
      +  "possibleTyposquatOf",
      +  "npmscanUrl"
      +]
    • addedOutput schema / properties / suggestions / items / properties / vulnerabilityCheckFailed
      Added value: +{
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / suggestions / items / required
      Previous value: -[
      -  "name",
      -  "version",
      -  "description",
      -  "npmscanUrl",
      -  "weeklyDownloads",
      -  "dependentsCount",
      -  "githubStars",
      -  "hasBuiltInTypes",
      -  "deprecated",
      -  "isLatestVersionVulnerable",
      -  "highestSeverity",
      -  "popularityTier",
      -  "maintenanceTier",
      -  "topPackagesRank",
      -  "categoryOverlap",
      -  "matchedQueries",
      -  "whySuggested"
      -]New value: +[
      +  "name",
      +  "version",
      +  "description",
      +  "npmscanUrl",
      +  "weeklyDownloads",
      +  "dependentsCount",
      +  "githubStars",
      +  "hasBuiltInTypes",
      +  "deprecated",
      +  "isLatestVersionVulnerable",
      +  "vulnerabilityCheckFailed",
      +  "highestSeverity",
      +  "popularityTier",
      +  "maintenanceTier",
      +  "topPackagesRank",
      +  "categoryOverlap",
      +  "matchedQueries",
      +  "whySuggested"
      +]
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and non-destructiveness, but the description goes far beyond that. It discloses critical behavioral nuances: unverifiable candidates are excluded rather than defaulting to safe, the source's vulnerabilityCheckFailed flag is the real signal (since isLatestVersionVulnerable returns false as a placeholder), and the ranking/filtering criteria. This is essential for an agent to interpret results correctly.

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?

The description is long but every sentence earns its place. It opens with the core purpose, then explains the methodology, then the best-use case, and finally a crucial caveat about vulnerability-check failure. The structure is logical and front-loaded with the primary action, making it easy for an agent to parse and apply.

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?

Despite the tool being read-only and having an output schema, the description covers exceptional cases like OSV check failures and candidate exclusion. It explains what the output contains (short list with whySuggested notes) and why certain candidates are never suggested. For a tool with this complexity, the description is exceptionally complete and leaves no critical gaps for correct invocation.

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%, so the baseline is 3. The description does not add much parameter-specific detail beyond what the schema already provides. It references the 'name' parameter as the source package and mentions the 'limit' implicitly in 'Max suggestions,' but these are already in the schema. The description's value is in process explanation, not parameter meanings.

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 states the exact purpose: given a problematic package, suggest better-maintained alternatives in the same category. It clearly distinguishes this from sibling tools by highlighting the category-matching and safety-filtering behavior, and explicitly frames it as turning a 'don't use' warning into a replacement shortlist.

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 description includes 'Best for turning a ... warning into an actionable replacement shortlist,' which gives clear usage context. It also explains the internal decision logic but does not explicitly name alternative sibling tools or say when NOT to use it (e.g., when you just want to search packages). Still, it provides enough situational guidance for an agent.

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.

Resources