Skip to main content
Glama

Currency Format

currency_format
Read-onlyIdempotent

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

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "currency_format"
  }
}

Input Schema

NameRequiredDescriptionDefault
cashNoUse cash rounding (CHF/CAD 0.05, DKK 0.50)
modeNoformat
signNostandard
textNoparse: the formatted money string
amountNoDecimal amount, e.g. 1234.5 or -0.005 (format / allocate)
digitsNoOverride the currency's fraction digits
localeNoen-US, de-DE, fr-CH, ja-JP, hi-IN ... or just a languageen-US
ratiosNoallocate: weights, e.g. 1,1,1 or 50,30,20
countryNoISO 3166 country: use its currency (info: list it)
displayNosymbol
currencyNoISO 4217 code (default: the locale's country currency)
roundingNohalfExpand

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already establish read-only, open-world, idempotent, and non-destructive behavior. The description adds substantive traits beyond that: exact decimal arithmetic with no floats, CLDR/ICU version, cash-rounding behavior, pricing at $0.001 USDC per successful call via x402, and an alternate HTTPS endpoint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the primary money-formatting purpose and packs mode, coverage, precision, and pricing details into a compact block. It is dense and parenthetical-heavy, but for a 12-parameter multi-mode tool the length is largely earned.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description must convey return behavior; it states that parse returns an exact amount and currency, allocation preserves cents, and info returns currency/country details. It still leaves response shapes and error behavior implicit, which is a modest gap for a tool with four modes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 67% schema description coverage, the schema carries substantial parameter documentation, but the description adds useful meaning: display options, standard vs accounting negatives, nine rounding modes, cash rounding examples, parse input examples, allocation ratios, and locale/currency coverage. It does not explicitly clarify every parameter, notably the digits override, so it is strong but not exhaustive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Money formatting and math with CLDR data' and enumerates the core operations: format, parse, allocate, and info. It also specifies locale/currency coverage and gives concrete examples such as Indian lakh grouping and Swiss apostrophes, making the tool's scope unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear usage contexts for each mode: formatting amounts, parsing formatted money strings, splitting amounts by ratios, and looking up currency or country info. It does not explicitly name when to use this instead of adjacent financial tools such as fx_rate or invoice_total, so it stops short of full alternatives guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources