Skip to main content
Glama

Simulate upgrading one package from one version to another, or a whole batch at once

simulate_dependency_upgrade
Read-only

Given a package and a current/target version, tells you whether that specific upgrade is a safe patch/minor bump or a likely-breaking major bump, before you actually run npm install. Natural follow-up to prioritize_remediation: pass its packageName + currentVersion + fixedVersion straight in to check whether the suggested fix is a drop-in patch or something that needs a review pass. Classifies the jump by semver (major/minor/patch/prerelease), treats a minor bump between two pre-1.0 (0.x) versions as breaking-risk per semver's own "the API isn't stable yet" convention, and flags skipping over multiple major versions in one jump (e.g. 2.x -> 5.x) as needing a per-major changelog review rather than just a diff against the final target. Beyond semver, it also checks the registry for real signals the version number alone won't tell you: whether the target version is marked deprecated, whether it introduces a preinstall/install/postinstall/prepare lifecycle script the current version didn't have, whether it tightens its engines.node requirement, and whether it is itself a prerelease. Finally it batch-checks both versions against OSV.dev and reports vulnerabilityDelta (introduced/fixed/still-vulnerable/still-clean) — catching the case where a suggested "fix" version doesn't actually clear every open CVE. Combines all of this into one riskTier (safe/low-risk/review-recommended/breaking-change-likely/unknown) with a reasons list explaining exactly which signals drove it. This does NOT read the package's changelog/release notes or scan the target tarball's source diff for actual breaking API usage — it's a fast, deterministic pre-check, not a substitute for reading the release notes on a flagged major bump. For simulating more than one upgrade at once — e.g. every "patch-now" finding prioritize_remediation just ranked — pass packages: [{packageName, currentVersion, targetVersion?}, ...] (1-100 items) instead of packageName/currentVersion/targetVersion, not both. Registry fetches are deduped/parallelized and all OSV checks for the whole batch run as one call, so this is not the same cost as N single-item calls. A package that can't be resolved at all (typo, unpublished, registry error) shows up as its own results entry with fetchError set instead of failing the whole batch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packagesNoBatch of upgrades to simulate (1-100 items), each mirroring the single-item packageName/currentVersion/targetVersion fields. Use this OR packageName/currentVersion, not both. Natural pairing with prioritize_remediation: pass its ranked findings straight in as one call instead of one simulate_dependency_upgrade call per finding.
packageNameNoExact npm package name, e.g. "lodash" or "@scope/name". Use this (with currentVersion) OR `packages`, not both.
targetVersionNoVersion to simulate upgrading to — exact version, range, or dist-tag (e.g. the fixedVersion a prioritize_remediation finding named). Omit to use the registry's "latest" dist-tag. Only applies to the single-item `packageName` form.
currentVersionNoCurrently installed version — an exact version (e.g. "4.17.20"), a semver range (e.g. "^4.17.0"), or a dist-tag. Required when `packageName` is used.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonsNo
resultsNo
verdictNo
riskTierNo
directionNo
npmscanUrlNo
semverBumpNo
packageNameNo
batchSummaryNo
engineChangeNo
zeroMajorNoteNo
targetDeprecatedNo
targetVersionNoteNo
currentVersionNoteNo
isBreakingBySemverNo
targetIsPrereleaseNo
targetIsVulnerableNo
vulnerabilityDeltaNo
currentIsVulnerableNo
majorVersionsSkippedNo
resolvedTargetVersionNo
targetVulnerabilitiesNo
requestedTargetVersionNo
resolvedCurrentVersionNo
installScriptIntroducedNo
requestedCurrentVersionNo

Schema Changelog

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

  1. Changed8 schema fields changed
    • changedInput schema / properties / currentVersion / description
      Previous value: -"Currently installed version — an exact version (e.g. \"4.17.20\"), a semver range (e.g. \"^4.17.0\"), or a dist-tag"New value: +"Currently installed version — an exact version (e.g. \"4.17.20\"), a semver range (e.g. \"^4.17.0\"), or a dist-tag. Required when `packageName` is used."
    • changedInput schema / properties / packageName / description
      Previous value: -"Exact npm package name, e.g. \"lodash\" or \"@scope/name\""New value: +"Exact npm package name, e.g. \"lodash\" or \"@scope/name\". Use this (with currentVersion) OR `packages`, not both."
    • addedInput schema / properties / packages
      Added value: +{
      +  "description": "Batch of upgrades to simulate (1-100 items), each mirroring the single-item packageName/currentVersion/targetVersion fields. Use this OR packageName/currentVersion, not both. Natural pairing with prioritize_remediation: pass its ranked findings straight in as one call instead of one simulate_dependency_upgrade call per finding.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "currentVersion": {
      +        "description": "Currently installed version — an exact version, a semver range, or a dist-tag",
      +        "maxLength": 128,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "packageName": {
      +        "description": "Exact npm package name, e.g. \"lodash\" or \"@scope/name\"",
      +        "maxLength": 214,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "targetVersion": {
      +        "description": "Version to simulate upgrading to — exact version, range, or dist-tag. Omit to use the registry's \"latest\" dist-tag.",
      +        "maxLength": 128,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "packageName",
      +      "currentVersion"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 100,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / properties / targetVersion / description
      Previous value: -"Version to simulate upgrading to — exact version, range, or dist-tag (e.g. the fixedVersion a prioritize_remediation finding named). Omit to use the registry's \"latest\" dist-tag."New value: +"Version to simulate upgrading to — exact version, range, or dist-tag (e.g. the fixedVersion a prioritize_remediation finding named). Omit to use the registry's \"latest\" dist-tag. Only applies to the single-item `packageName` form."
    • removedInput schema / required
      Removed value: -[
      -  "packageName",
      -  "currentVersion"
      -]
    • addedOutput schema / properties / batchSummary
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "fetchFailedCount": {
      +      "type": "number"
      +    },
      +    "riskTierCounts": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "breakingChangeLikely": {
      +          "type": "number"
      +        },
      +        "lowRisk": {
      +          "type": "number"
      +        },
      +        "reviewRecommended": {
      +          "type": "number"
      +        },
      +        "safe": {
      +          "type": "number"
      +        },
      +        "unknown": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "safe",
      +        "lowRisk",
      +        "reviewRecommended",
      +        "breakingChangeLikely",
      +        "unknown"
      +      ],
      +      "type": "object"
      +    },
      +    "totalRequested": {
      +      "type": "number"
      +    },
      +    "vulnQueryFailedCount": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "totalRequested",
      +    "fetchFailedCount",
      +    "riskTierCounts",
      +    "vulnQueryFailedCount"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / results
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "currentIsVulnerable": {
      +        "type": [
      +          "boolean",
      +          "null"
      +        ]
      +      },
      +      "currentVersionNote": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "direction": {
      +        "enum": [
      +          "upgrade",
      +          "downgrade",
      +          "same",
      +          "unresolved"
      +        ],
      +        "type": "string"
      +      },
      +      "engineChange": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "after": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "before": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "tightened": {
      +                "type": "boolean"
      +              }
      +            },
      +            "required": [
      +              "before",
      +              "after",
      +              "tightened"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "fetchError": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "installScriptIntroduced": {
      +        "type": [
      +          "boolean",
      +          "null"
      +        ]
      +      },
      +      "isBreakingBySemver": {
      +        "type": [
      +          "boolean",
      +          "null"
      +        ]
      +      },
      +      "majorVersionsSkipped": {
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "npmscanUrl": {
      +        "type": "string"
      +      },
      +      "packageName": {
      +        "type": "string"
      +      },
      +      "reasons": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "requestedCurrentVersion": {
      +        "type": "string"
      +      },
      +      "requestedTargetVersion": {
      +        "type": "string"
      +      },
      +      "resolvedCurrentVersion": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "resolvedTargetVersion": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "riskTier": {
      +        "enum": [
      +          "safe",
      +          "low-risk",
      +          "review-recommended",
      +          "breaking-change-likely",
      +          "unknown"
      +        ],
      +        "type": "string"
      +      },
      +      "semverBump": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "major",
      +              "premajor",
      +              "minor",
      +              "preminor",
      +              "patch",
      +              "prepatch",
      +              "prerelease"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "targetDeprecated": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "targetIsPrerelease": {
      +        "type": [
      +          "boolean",
      +          "null"
      +        ]
      +      },
      +      "targetIsVulnerable": {
      +        "type": [
      +          "boolean",
      +          "null"
      +        ]
      +      },
      +      "targetVersionNote": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "targetVulnerabilities": {
      +        "items": {
      +          "$ref": "#/properties/targetVulnerabilities/items"
      +        },
      +        "type": "array"
      +      },
      +      "verdict": {
      +        "type": "string"
      +      },
      +      "vulnerabilityDelta": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "introduced",
      +              "fixed",
      +              "still-vulnerable",
      +              "still-clean",
      +              "unknown"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "zeroMajorNote": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "packageName",
      +      "npmscanUrl",
      +      "requestedCurrentVersion",
      +      "requestedTargetVersion",
      +      "resolvedCurrentVersion",
      +      "resolvedTargetVersion",
      +      "currentVersionNote",
      +      "targetVersionNote",
      +      "direction",
      +      "semverBump",
      +      "isBreakingBySemver",
      +      "majorVersionsSkipped",
      +      "zeroMajorNote",
      +      "targetIsPrerelease",
      +      "targetDeprecated",
      +      "installScriptIntroduced",
      +      "engineChange",
      +      "currentIsVulnerable",
      +      "targetIsVulnerable",
      +      "vulnerabilityDelta",
      +      "targetVulnerabilities",
      +      "riskTier",
      +      "reasons",
      +      "verdict",
      +      "fetchError"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "packageName",
      -  "npmscanUrl",
      -  "requestedCurrentVersion",
      -  "requestedTargetVersion",
      -  "resolvedCurrentVersion",
      -  "resolvedTargetVersion",
      -  "currentVersionNote",
      -  "targetVersionNote",
      -  "direction",
      -  "semverBump",
      -  "isBreakingBySemver",
      -  "majorVersionsSkipped",
      -  "zeroMajorNote",
      -  "targetIsPrerelease",
      -  "targetDeprecated",
      -  "installScriptIntroduced",
      -  "engineChange",
      -  "currentIsVulnerable",
      -  "targetIsVulnerable",
      -  "vulnerabilityDelta",
      -  "targetVulnerabilities",
      -  "riskTier",
      -  "reasons",
      -  "verdict"
      -]
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/openWorldHint/destructiveHint=false, and the description is fully consistent with them. Beyond the annotations, it discloses the complete signal set (deprecation, lifecycle script introduction, engines.node tightening, prerelease status), the vulnerabilityDelta semantics against OSV.dev, the 0.x-as-breaking semver convention, multi-major jump handling, the deduped/parallelized cost model, and per-item fetchError isolation instead of whole-batch failure.

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?

The description is long (~300 words) but every sentence carries non-redundant information for a genuinely complex tool, and it is front-loaded with the core contract before diving into signals, exclusions, and batch behavior. Its structure flows logically, though it is slightly wordy in spots (repeated 'not both', dense parenthetical-heavy sentences) — dense but earned.

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?

For a tool with two invocation forms, a rich output schema, and multiple analysis signals, the description covers everything needed to call it correctly: single vs batch inputs, output contract (riskTier, vulnerabilityDelta, reasons, fetchError), explicit non-goals, cost characteristics, and error behavior. Nothing critical is left to inference.

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%, so the baseline is 3. The description adds genuine value beyond the schema: mutual exclusivity of packages vs packageName/currentVersion, the default of targetVersion to the 'latest' dist-tag when omitted, mapping fixedVersion from prioritize_remediation findings directly, and the batch cost note (one deduped call vs N single calls). This elevates it above baseline, though the schema already documents each field's format precisely.

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 opening sentence states a specific verb and resource with a concrete outcome: 'tells you whether that specific upgrade is a safe patch/minor bump or a likely-breaking major bump, before you actually run npm install.' It differentiates itself from siblings immediately by scoping to pre-install upgrade simulation and explicitly names prioritize_remediation as its natural predecessor, so an agent can distinguish it without opening schemas.

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?

The description names the exact workflow context ('Natural follow-up to prioritize_remediation: pass its packageName/currentVersion/fixedVersion straight in') and states explicit exclusions: 'This does NOT read the package's changelog/release notes... not a substitute for reading the release notes on a flagged major bump.' It also gives precise when-to-use guidance for batch vs single-item invocation, including the 'not both' rule.

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