{"uid":"cap_llTd1iZC25haGIb18YVy7","slug":"agent402-tools-semantic-version-parser-comparator-346b9fa1","name":"agent402.tools Semantic Version Parser & Comparator","description":"Parse a semantic version, or compare two (a vs b → -1/0/1, with greater/lesser flags).","url":"https://agent402.tools/api/semver","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"a":{"type":"string","description":"Version to parse (or left side of compare)"},"b":{"type":"string","description":"Optional right side of compare"}}},"responseSchema":{"type":"json","example":{"a":{"major":2,"minor":4,"patch":0},"equal":false,"aGreater":false,"comparison":-1}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_NLnszaCahLDVha3VVcs2N","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses a semantic version string into its components, or compares two semver strings returning -1, 0, or 1 with greater/lesser flags.","exampleAgentPrompt":"Can you compare these two version strings for me — is 2.4.1 greater than, equal to, or less than 2.10.0?","exampleUseCases":null,"resultDescription":"Returns parsed components of the version string (major, minor, patch, pre-release, etc.) and, when two versions are provided, a comparison integer (-1, 0, or 1) along with boolean greater/lesser flags indicating the ordering relationship between version a and version b.","failureModes":["Malformed version string (e.g. 'abc' or '1.x.y') may return a parse error","Missing required field 'a' returns a validation error","Non-semver format strings may fail to parse correctly","Network or payment authorization failure returns HTTP 402 or 5xx"],"whenToPreferThis":"Use this endpoint when you need to programmatically parse a semantic version string into structured components or compare two semver strings according to semver spec ordering rules — particularly useful in CI/CD pipelines, package managers, update checkers, or any workflow needing version ordering logic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:14:06.182Z","isFirstParty":false}