Check a version against an npm range
check_rangeDoes a version satisfy an npm-style range (^, ~, x-ranges, hyphen ranges, comparators, || alternatives)? Returns the answer and the range desugared into plain comparators (e.g. ^0.2.3 → >=0.2.3 <0.3.0-0), with a note when npm's prerelease rule is why it fails. Read-only. Same engine as GET /api/satisfies.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"version": "<version>",
"range": "<range>"
},
"name": "check_range"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | npm-style range, e.g. "^1.2.0", "~1.4", ">=1.0.0 <2.0.0", "1.2.3 - 2.x", "1.x || >=3.0.0-beta.1". | |
| version | Yes | Version to test: a semantic version such as "1.4.2", "v2.0.0" or "3.0.0-rc.1+build.5". | |
| includePrerelease | No | Let prereleases match any range they fall inside (npm includePrerelease). Default false (npm behaviour). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | ||
| range | No | ||
| version | No | ||
| satisfies | Yes | ||
| apiVersion | Yes | ||
| normalized | Yes | ||
| includePrerelease | No |