Parse locale-formatted money text (1.234,56, 1,00,000, accounting parentheses) without guessing
Parses up to 100 number or money strings such as "1.234,56", "1,00,000", "(1,234.50)", "¥1,000" or "CHF 1'234.50" into canonical decimal strings, for an agent reading amounts from documents, emails or tables. With a BCP 47 locale it applies that locale's CLDR separators (read from Intl.NumberFormat); without one it lists every valid reading and an ambiguous string such as "1,234" returns unknown with both (1234 and 1.234) instead of a guess. Understands leading and trailing minus, U+2212, accounting parentheses, non-ASCII digit systems and currency symbols or ISO codes (a symbol shared by several currencies, such as ¥ or $, is reported as ambiguous unless the caller names the currency). Does not convert currencies and does not round.
What you get
"1,234" is one thousand or one-point-two-three-four depending on the author; the wrong guess is a 1000x error. Ambiguity is returned, not resolved silently.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/locale-number. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/locale-number \
-H 'content-type: application/json' \
-d '{"items":[{"text":"1.234,56","locale":"de-DE"},{"text":"1,00,000"},{"text":"1,234"},{"text":"(1,234.50)","currency":"USD"}]}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
items | array<object>; max 100 items | yes |
Example request body
{
"items": [
{
"text": "1.234,56",
"locale": "de-DE"
},
{
"text": "1,00,000"
},
{
"text": "1,234"
},
{
"text": "(1,234.50)",
"currency": "USD"
}
]
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
items | array<object> | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the money-math-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent