format_number
Format numbers into currency, percentage, scientific notation, binary, octal, hexadecimal, significant figures, or thousands-separated strings.
Instructions
Format a number in various ways: currency ($1,234.56), percentage (0.15 -> 15%), scientific notation, binary, octal, hexadecimal, significant figures, thousands separator.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"value": "<value>",
"format": "<format>"
},
"name": "format_number"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | The number to format | |
| format | Yes | The format type | |
| decimals | No | Number of decimal places (default: 2 for currency/percentage/scientific/thousands) | |
| separator | No | Thousands separator character (default: ",") | |
| currency_symbol | No | Currency symbol (default: "$") | |
| significant_figures | No | Number of significant figures (required for significant_figures format) |