Home / Servers / Calculators / format_number

Format number

An MCP tool from the Calculators server, hosted on mcp.hjlabs.in.

Format a number for people: thousands separators in a locale, fixed decimals, currency, percent, compact ("1.2M"), scientific, or as an ordinal (1st, 2nd).

Name on the gateway: math__format_number · read-only.

Parameters

NameTypeDescription
number requirednumberThe number.
styledecimal | currency | percent | compact | scientific | ordinalDefault "decimal".
localestringBCP 47 locale, e.g. "en-US", "en-IN", "de-DE". Default "en-US".
currencystringISO 4217 code for currency style, e.g. "USD", "INR". Default "USD".
decimalsintegerFixed number of decimal places. Optional.

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "math__format_number",
  "arguments": {
    "number": 0
  }
}

Or connect the Calculators server directly, which lists 28 tools including this one:

Run in your terminal
claude mcp add --transport http hj-math https://mcp.hjlabs.in/mcp/math \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the format number tool with number set to ….

More from Calculators