Sort versions and resolve a range
resolve_versionsSort 1 to 200 versions by SemVer precedence (duplicates removed, invalid ones listed separately) and, if a range is given, return the matching versions plus maxSatisfying / minSatisfying (what npm would install from that list) and the latest stable version. Read-only. Same engine as GET /api/resolve.
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": {
"versions": "<versions>"
},
"name": "resolve_versions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | No | 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". | |
| versions | Yes | 1 to 200 versions. | |
| includePrerelease | No | Let prereleases match any range they fall inside (npm includePrerelease). Default false (npm behaviour). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| range | No | ||
| sorted | Yes | ||
| invalid | No | ||
| matching | Yes | ||
| apiVersion | Yes | ||
| normalized | No | ||
| latestStable | No | ||
| maxSatisfying | Yes | ||
| minSatisfying | No | ||
| duplicatesRemoved | No | ||
| includePrerelease | No |