Compare versions / check a semver range
semver_compareCompare two semantic versions (incl. prerelease ordering) or test whether a version satisfies an npm-style range (^, ~, x, comparators, ||).
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": {
"a": "<a>"
},
"name": "semver_compare"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | Version, e.g. 1.4.2 | |
| b | No | Version to compare with | |
| range | No | Range to test a against, e.g. ^1.2.0 || >=2.0.0 <3 |