{"uid":"cap_sfXvSFaNdqsw9yGq5mk99","slug":"semver-compare-836f5af3","name":"semver-compare","description":"Semantic-version helper: compare two versions (-1/0/1 with which is newer), test whether a version satisfies a range (^, ~, >=, <, x-ranges, hyphen ranges, ||), or sort a comma/space list of versions descending with prerelease handling. Parses major/minor/patch/prerelease/build. $0.01 per operation.","url":"https://intel.rallylive.ca/dev/semver","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_6U65e9MSe0-T9oTXpKjgY","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compare two semantic versions, check if a version satisfies a range, or sort a list of versions with prerelease handling","exampleAgentPrompt":"Compare 2.1.0-beta.3 and 2.1.0 to tell me which is newer, and also check if 2.1.0-beta.3 satisfies the range ^2.0.0.","exampleUseCases":[{"title":"Dependency range compatibility check","prompt":"Check if version 3.14.1 satisfies the semver range ^3.12.0 so I know if I can use it without a major upgrade."},{"title":"Sorting release candidates descending","prompt":"Sort these versions from newest to oldest: 1.0.0, 1.0.0-rc.2, 1.0.0-rc.1, 0.9.8, 1.0.1, 1.1.0-alpha."},{"title":"Comparing two package versions","prompt":"I have versions 4.5.0 and 4.4.9 — which one is newer? Return -1, 0, or 1."}],"resultDescription":"Returns a comparison integer (-1, 0, or 1) for two-version comparisons indicating which is newer; a boolean for range satisfaction checks; or an ordered list of version strings sorted descending for sort operations. Also exposes parsed components: major, minor, patch, prerelease, and build metadata.","failureModes":["Invalid semver string causes parse error or unexpected result","Unsupported range syntax not covered by the API","Missing required query parameters returns an error","Non-semver version strings (e.g. CalVer, date-based) may fail to parse correctly"],"whenToPreferThis":"Use this endpoint when you need a lightweight, pay-per-call semver utility without bundling a full semver library. Ideal for agents that occasionally need to compare, validate, or sort version strings in automation pipelines, CI checks, or dependency audits. Prefer over a local library when running in a serverless or constrained environment.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T13:05:35.478Z","isFirstParty":false}