{"uid":"cap_6Tn1Xsuabak5CpRQC2hYE","slug":"agent402-uk-semver-comparator-7be61858","name":"Agent402 UK Semver Comparator","description":"Don't burn tokens on deterministic work. Go/no-go jobs first: payout preflight, text firewall (PII/secrets), budget check — then rails, calendars, finmath. x402 USDC on Base. UK + global. agent402.co.uk — not agent402.tools. $0.001–$0.002 USDC on Base. No API keys.","url":"https://agent402.co.uk/v1/utils/semver","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"a":{"type":"string","description":"Left version"},"b":{"type":"string","description":"Right version"}}},"responseSchema":{"type":"json","example":{"cmp":-1,"valid":true,"relation":"lt"}},"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":"down","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_YxW6eHiGNFyrbS6y4Vw3l","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":"Compares two semantic version strings (major.minor.patch) and returns the ordering relation (lt, eq, gt) with validity confirmation.","exampleAgentPrompt":"Is version 1.9.2 less than, equal to, or greater than 2.0.0? I need a definitive comparison so I can decide whether to block the deployment.","exampleUseCases":[{"title":"Dependency version gate in CI pipeline","prompt":"Before we proceed with the build, check whether the installed library version 3.4.1 is less than the required minimum 3.5.0 — I need a hard yes or no, not a guess."},{"title":"Upgrade decision for a running service","prompt":"We're running service version 2.11.0 and the latest release is 2.12.3 — compare them and tell me if we're behind."},{"title":"Validating user-supplied version input","prompt":"A user submitted '1.0.0' and '1.0.0-beta' as their version strings — can you compare them and also tell me if both are valid semver?"}],"resultDescription":"Returns a JSON object with three fields: 'cmp' (integer: -1 if a < b, 0 if equal, 1 if a > b), 'valid' (boolean indicating both inputs are well-formed semver), and 'relation' (string: 'lt', 'eq', or 'gt').","failureModes":["Invalid or malformed semver string returns valid:false with relation undefined","Missing 'a' or 'b' field causes a 400-level error","Pre-release or build-metadata suffixes (e.g. 1.0.0-beta) may affect validity flag","Network timeout or payment failure returns a 402 or 5xx response"],"whenToPreferThis":"Use this endpoint when an agent needs a deterministic, authoritative semver comparison without relying on an LLM to guess version ordering — especially useful in CI/CD gates, dependency checks, or any workflow where version logic correctness is critical. Prefer it over asking an LLM directly when you need the 'valid' flag to also confirm input well-formedness.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:28:53.381Z","isFirstParty":false}