currency_format
Money formatting and math with CLDR data (ICU 78 / CLDR 48, matches Intl.NumberFormat): format an amount for any of 60 locales and 154 active ISO 4217 currencies (symbol, narrow symbol or code; standard or accounting negatives; Indian lakh grouping, Swiss apostrophes, RTL marks), round with 9 mod...
This record as markdown: /tools/com-it-scorptech-x402/currency-format.md
What currency_format does on ScorpTech x402 API
AI agents call currency_format to retrieve information from ScorpTech x402 API without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
cash | boolean | — | Use cash rounding (CHF/CAD 0.05, DKK 0.50) |
mode | string | — | |
sign | string | — | |
text | string | — | parse: the formatted money string |
amount | string | — | Decimal amount, e.g. 1234.5 or -0.005 (format / allocate) |
digits | integer | — | Override the currency's fraction digits |
locale | string | — | en-US, de-DE, fr-CH, ja-JP, hi-IN ... or just a language |
ratios | array | — | allocate: weights, e.g. 1,1,1 or 50,30,20 |
country | string | — | ISO 3166 country: use its currency (info: list it) |
display | string | — | |
currency | string | — | ISO 4217 code (default: the locale's country currency) |
rounding | string | — |
Parameters from the server's own tool schema.
Why currency_format is rated Low
Even though currency_format only reads data, uncontrolled read access leaks sensitive information and racks up API costs: an agent caught in a retry loop can make thousands of calls a minute without anyone noticing.
Risk signalsHigh parameter count (12 properties)
Attacks that exploit this kind of access
The rule that runs currency_format safely
PolicyLayer is an MCP gateway: it sits between your AI agents and ScorpTech x402 API, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For currency_format, this is the rule to start with:
currency_format is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect ScorpTech x402 API, apply this rule, and every currency_format call is checked against it from then on.
Questions about currency_format
Money formatting and math with CLDR data (ICU 78 / CLDR 48, matches Intl.NumberFormat): format an amount for any of 60 locales and 154 active ISO 4217 currencies (symbol, narrow symbol or code; standard or accounting negatives; Indian lakh grouping, Swiss apostrophes, RTL marks), round with 9 modes or cash rounding (CHF 0.05), parse a formatted string such as "1.234,56 €" or "(US$1,234.50)" back to an exact amount and currency, split an amount by ratios without losing a cent (largest remainder) and look up currency or country info (digits, symbols, cash rounding, countries). Exact decimal arithmetic, no floats. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: GET https://scorptech.it.com/api/x402/v1/currency-format. It is categorised as a Read tool in the ScorpTech x402 API MCP Server, which means it retrieves data without modifying state.
currency_format accepts 12 parameters: cash, mode, sign, text, amount, digits, locale, ratios, country, display, currency, rounding. The full parameter table on this page comes from the server's own tool schema.
Register the ScorpTech x402 API MCP server in PolicyLayer and add a rule for currency_format: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches ScorpTech x402 API. Nothing to install.
currency_format is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the currency_format rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for currency_format. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
currency_format is provided by the ScorpTech x402 API MCP server (https://scorptech.it.com/api/x402/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on ScorpTech x402 API, and thousands of servers like it.
This server
Across the catalogue