format_number
Format numbers with locale-aware grouping and decimal separators, supporting Eastern Arabic numerals for Arabic locales.
Instructions
Format a number with locale-aware grouping, decimal separators, and optional Eastern Arabic numerals (e.g. 1234567.89 with numerals "arab" -> "١٬٢٣٤٬٥٦٧٫٨٩").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | The number to format. | |
| locale | No | BCP-47 locale, e.g. 'ar', 'ar-SA', 'en'. Defaults to 'ar'. | |
| numerals | No | Numeral system: 'latn' (1234), 'arab' (Eastern Arabic ١٢٣٤), or 'arabext' (Persian/Urdu ۱۲۳۴). |