{"uid":"cap_QNcyOI9lXMwz2dzBWiqIn","slug":"semver-compare-67a3f2cd","name":"Semver Compare","description":"Compare two semantic versions and report which is greater (precedence-aware).","url":"https://semver.openverbs.com/v1/compare","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["a","b"],"properties":{"a":{"type":"string","maxLength":256,"minLength":1,"description":"First version."},"b":{"type":"string","maxLength":256,"minLength":1,"description":"Second version."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_72JZym2hUN-ZDsDakbz3Y","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compares two semantic version strings and returns which one has higher precedence according to the semver specification.","exampleAgentPrompt":"Which version is greater according to semver rules — 1.10.0 or 1.9.5?","exampleUseCases":[{"title":"Dependency upgrade decision","prompt":"I have two candidate versions of a library I'm considering upgrading to: 2.3.0-rc.1 and 2.2.9. Which one takes semver precedence?"},{"title":"CI pipeline version gate","prompt":"Our pipeline just produced version 4.0.0-alpha.3 and the last published release is 3.9.9. Which one is considered greater by semver rules?"},{"title":"Release tag ordering","prompt":"Compare these two git release tags for me: v1.0.0-beta.11 and v1.0.0-beta.9 — which one is the higher semver version?"}],"resultDescription":"Returns a comparison result indicating the precedence relationship between the two provided semantic version strings — specifically which version is greater, or whether they are equal, according to official semver 2.0.0 ordering rules including prerelease and build metadata handling.","failureModes":["Invalid or malformed semver string causes a 400-level error","Missing required field 'a' or 'b' results in a validation error","Version strings exceeding 256 characters are rejected","Non-semver strings (e.g. plain integers or date-based versions) may not parse correctly","Network timeout or service unavailability returns a 5xx error"],"whenToPreferThis":"Choose this endpoint when you need a single, authoritative semver-spec-compliant comparison between exactly two version strings, especially when prerelease identifiers (alpha, beta, rc) or complex versioning schemes are involved. It is preferable over manual string comparison or custom parsing logic, which commonly mis-order versions like 1.9.0 vs 1.10.0 or prerelease versions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:41:21.642Z","isFirstParty":false}