Skip to main content
Glama

Text & Number Toolkit

Format a number for a locale

format_number
Read-onlyIdempotent

Locale-correct display of a decimal, currency amount or percentage using CLDR rules: grouping (1,234,567 / 12,34,567 / 1.234.567 / 1 234 567), decimal mark, currency symbol placement, Arabic-Indic digits for ar_* locales. Example: number 1234567.891, locale 'en_IN', style 'currency', currency 'INR'. Response: result plus data_confidence, estimated_items[], sources[], data_version, warnings[]; deterministic (no AI inside), nothing logged.

Input Schema

NameRequiredDescriptionDefault
styleNodecimal
localeYesCLDR locale: 'en', 'en_IN' (lakh grouping), 'ar_AE' (Arabic-Indic digits), 'de_DE', 'fr_CH'…
numberYesNumber to format.
currencyNoISO 4217 code when style=currency.
decimalsNoForce a number of decimal places; default = locale/currency rule.
numberingNoDigit system: locale default (ar_EG → Arabic-Indic, ar_AE → Western), or force latn / arab.locale

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile is covered. The description adds genuinely new behavioral facts beyond them: deterministic with no AI inside and no logging of inputs, which matters for a formatting utility handling possibly sensitive amounts.

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?

Front-loaded with the core capability and grouping examples, then the example, then the response. Mostly earns its space, but the enumeration of response fields (data_confidence, estimated_items, sources, data_version, warnings) is redundant given an output schema exists.

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?

An output schema exists, so return values need not be explained, and the description instead wastes a clause listing them. Everything an agent needs to call it correctly is present: scope, example, determinism, and no-logging guarantee; only explicit sibling routing is absent.

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?

Schema coverage is high (83%) and already documents locale, currency, decimals and numbering well. The description adds marginal but real value by showing the three-parameter interplay (locale+style+currency) and illustrating grouping outputs per locale, though the per-locale grouping examples largely echo the schema's locale hints.

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

Purpose4/5

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

States a specific verb (format/number) and enumerates the exact behaviors: grouping variants, decimal mark, currency symbol placement, Arabic-Indic digits under CLDR. It is clearly not parse_number or number_to_words, but it never names or explicitly contrasts with those siblings, leaving the agent to infer the boundary.

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

Usage Guidelines3/5

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

The worked example (1234567.891 / en_IN / currency / INR) implies when the tool applies, but there is no explicit when-to-use, when-not, or routing to alternatives such as number_to_words or format vs. parse_number. Usage is inferable rather than stated.

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