Format Number
format_numberFormat a number with grouping, fixed decimals, as a percentage, or in compact notation (keyless, offline). style = "decimal" (default), "percent", or "compact".
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"style": "decimal",
"locale": "en-US",
"number": 1234.567,
"decimals": 2
},
"name": "format_number"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | decimal (default) | percent | compact. | |
| locale | No | BCP-47 locale (default "en-US"). | |
| number | Yes | The number to format. | |
| decimals | No | Fixed number of fraction digits. |