{"uid":"cap_AuDw9zz5sdi8EME0mMLx0","slug":"agent402-uk-money-math-0ef8ef68","name":"Agent402 UK Money Math","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/math/money?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"a":{"type":"string","description":"Left operand (money decimal string)"},"b":{"type":"string","description":"Right operand or factor/divisor"},"op":{"type":"string","description":"add | sub | mul | div | allocate | round"},"mode":{"type":"string","description":"half_up | half_even | floor | ceil | down | up (mul/div/round)"},"parts":{"type":"number","description":"allocate into N equal parts (1-100); number preferred (string also accepted)"},"scale":{"type":"string","description":"Optional override 0-18 minor digits"},"amount":{"type":"string","description":"For allocate|round|mul|div alias of a"},"ratios":{"type":"array","description":"allocate by weights e.g. [1,2,1]"},"amounts":{"type":"array","description":"For add: list of decimal strings"},"currency":{"type":"string","description":"ISO 4217 code for scale (JPY=0, USD/GBP=2, BHD=3; USDC=6). Default scale 2"}}},"responseSchema":{"type":"json","example":{"op":"allocate","sum":"10.00","scale":2,"valid":true,"results":["3.34","3.33","3.33"],"currency":"USD"}},"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_8CMyKW0VoNu1QeneSdlBj","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":"Performs exact decimal money arithmetic (add, subtract, multiply, divide, allocate, round) at ISO 4217 minor-unit precision using string-based amounts to avoid floating-point errors.","exampleAgentPrompt":"Split $10.00 exactly among 3 people using half_up rounding in USD — I need each person's share as a precise decimal string with no floating point weirdness.","exampleUseCases":[{"title":"Invoice line item total","prompt":"Multiply $24.99 by 7 units using half_up rounding in USD and give me the exact total for the invoice line — no floating point errors."},{"title":"Weighted payout allocation","prompt":"Allocate $1000.00 among three partners in a 2:3:5 ratio in USD — I need exact decimal strings for each payout so the amounts sum perfectly."},{"title":"Tax multiplier on price","prompt":"Multiply $49.95 by 1.2 for UK VAT using half_even rounding in GBP and return the exact amount I should charge the customer."}],"resultDescription":"A JSON object containing the operation performed, the exact result as a decimal string (or an array of strings for allocate), the scale used, currency code, and a validity flag confirming the arithmetic is sound.","failureModes":["Non-numeric or malformed string operands return a validation error","Division by zero returns an error result","Unsupported operator value causes rejection","Parts count outside 1-100 range for allocate is rejected","Mismatched or unknown ISO 4217 currency code may default scale or error","Missing required operand fields return a schema validation error"],"whenToPreferThis":"Use this endpoint whenever financial precision is mandatory and floating-point representation errors are unacceptable — e.g. invoice totals, tax computation, fee splits, payout allocation, or any arithmetic where cents must balance exactly. Prefer it over general-purpose calculators or code execution when you need deterministic, auditable money arithmetic without writing or running code.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T06:41:39.880Z","isFirstParty":false,"canonicalSlug":"agent402-uk-money-math-0ef8ef68"}