Skip to main content
Glama

Formatear número por país

number-format-locale
Read-onlyIdempotent

Formatea un número según el idioma/país con Intl (decimal, porcentaje, compacto, científico). Cuándo: un resultado numérico tiene que ser exacto o reproducible y no estimado. No para: redondear a N decimales con aritmética decimal exacta y modos half_up, half_even (round-number). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Formats a number for a locale with Intl.NumberFormat: decimal, percent, compact (1.2K / 1,2 mil), scientific or engineering notation, with min/max fraction digits and grouping. When: a numeric result has to be exact or reproducible instead of estimated. Not for: rounding a number to N decimal places using exact decimal arithmetic (round-number). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
styleNoStyle (optional; one of: decimal, percent, compact, scientific, engineering; default "decimal").decimal
valueYesNumber (number; required).
localeNoBCP 47 locale (string; optional; default "en-US"; up to 35 chars; pattern ^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$).en-US
groupingNoUse grouping separators (boolean; optional; default true).
max_fraction_digitsNoMax fraction digits (integer; optional; min 0; max 20).
min_fraction_digitsNoMin fraction digits (integer; optional; min 0; max 20).

Output Schema

NameRequiredDescriptionDefault
localeNo
formattedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / value / examples
      Added value: +[
      +  1234567.891
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Formats a number for a locale with Intl.NumberFormat: decimal, percent, compact (1.2K / 1,2 mil), scientific or engineering notation, with min/max fraction digits and grouping. When: a numeric result has to be exact or reproducible instead of estimated. Not for: rounding a number to N decimal places using exact decimal arithmetic (round-number). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive/non-openWorld, and the description still adds real context: no network, no stored state, determinism, plus concrete limits (64 KB input, 1 s per call, 1 MB output). That exceeds the lower bar annotations set.

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 action, then When / Not for / effects / limits in a scannable order. It is somewhat verbose because the same content is restated in Spanish, English, and again in inputSchema.description, which costs a point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter read-only formatter with a full output schema and complete annotation coverage, nothing an agent needs is missing: purpose, alternatives, determinism, and resource limits are all present.

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 100%, so the baseline is 3; the description adds value by showing concrete compact output examples ("1.2K / 1,2 mil") and restating the min/max fraction digit and grouping behavior. It does not explain that percent style multiplies by 100, a meaningful semantic gap that keeps it below 5.

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

Purpose5/5

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

States a specific verb+resource ("Formats a number for a locale with Intl.NumberFormat") and enumerates the supported styles (decimal, percent, compact, scientific, engineering). An agent can distinguish it from sibling formatting/conversion tools without opening the schema.

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

Usage Guidelines5/5

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

Explicit "When:" clause sets the selection condition (exact/reproducible numeric output) and an explicit "Not for:" clause names the alternative sibling round-number and the condition that routes to it. This is the strongest possible routing guidance.

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