{"uid":"cap_z6vyoU2Ilmsxo_RJRfDr8","slug":"gcd-lcm-calculator-agent402-tools-b4293da6","name":"GCD & LCM Calculator (agent402.tools)","description":"Compute the greatest common divisor (Euclidean algorithm) and least common multiple of two positive integers. Also reports whether the two numbers are coprime (GCD = 1).","url":"https://agent402.tools/api/gcd-lcm","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"a":{"type":"integer","description":"First positive integer"},"b":{"type":"integer","description":"Second positive integer"}}},"responseSchema":{"type":"json","example":{"a":48,"b":18,"gcd":6,"lcm":144,"coprime":false}},"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_b5nl7s4Zv0KkxYysS4SJy","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":"Computes the greatest common divisor (GCD) and least common multiple (LCM) of two positive integers, and reports whether they are coprime.","exampleAgentPrompt":"What's the GCD and LCM of 48 and 180, and are they coprime?","exampleUseCases":null,"resultDescription":"Returns the greatest common divisor (GCD), least common multiple (LCM), and a boolean indicating whether the two input integers are coprime (i.e., GCD equals 1).","failureModes":["Non-positive integers or zero passed as input — likely a 400 bad request","Non-integer values (floats, strings) passed — likely a 400 validation error","Missing one or both required parameters a or b — likely a 422 unprocessable entity","Payment not included or insufficient — 402 payment required response"],"whenToPreferThis":"Use this endpoint when you need both GCD and LCM computed together in a single call, along with coprimality detection — especially useful in number theory tasks, fraction simplification, scheduling problems, or cryptographic checks where knowing whether two numbers share common factors matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:14:03.348Z","isFirstParty":false}