Skip to main content
Glama

Formatear moneda por país

currency-format
Read-onlyIdempotent

Formatea un monto en cualquier moneda ISO 4217 según el idioma/país (símbolo, código o nombre), con sus decimales estándar. Cuándo: un cálculo de dinero, impuestos o matemática financiera tiene que ser exacto y reproducible (redondeo, centavos, tasas). No para: formatear un valor en pesos colombianos (co-cop-format). 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 an amount in any ISO 4217 currency for a locale via Intl (symbol, narrow symbol, code or name), using the currency's standard minor units unless overridden, and accounting style for negatives. When: a money, tax or financial-math result has to be exact and reproducible (rounding, cents, rates). Not for: formatting an amount as Colombian pesos the way it is written in Colombia (co-cop-format). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
amountYesAmount (number; required; min -1000000000000000; max 1000000000000000).
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
displayNoCurrency display (optional; one of: symbol, narrowSymbol, code, name; default "symbol").symbol
currencyNoISO 4217 currency code (string; optional; default "USD"; pattern ^[A-Za-z]{3}$).USD
decimalsNoOverride decimals (integer; optional; min 0; max 6).
accountingNoParentheses for negatives (boolean; optional; default false).

Output Schema

NameRequiredDescriptionDefault
formattedNo
minor_unitsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / amount / examples
      Added value: +[
      +  1234.5
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Formats an amount in any ISO 4217 currency for a locale via Intl (symbol, narrow symbol, code or name), using the currency's standard minor units unless overridden, and accounting style for negatives. When: a money, tax or financial-math result has to be exact and reproducible (rounding, cents, rates). Not for: formatting an amount as Colombian pesos the way it is written in Colombia (co-cop-format). 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.6/5.0
Behavior4/5

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

Goes beyond the annotations by disclosing determinism ('la misma entrada da la misma salida') and concrete operational limits (64 KB JSON input, 1 s per call, 1 MB result), which annotations cannot express. The 'solo lectura, sin red, sin estado guardado' clause largely restates readOnlyHint and openWorldHint=false, so part of the sentence is redundant rather than additive.

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 purpose, then cleanly segmented into Cuándo / No para / Efectos / Determinista / Límites, so an agent can scan it fast. The full ES and EN duplication inflates length noticeably for a tool whose schema is already self-documenting.

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?

All six parameters are documented in the schema, an output schema exists so return values need no prose, and the description still covers the decision criteria, safety profile and hard limits. Nothing an agent needs to invoke this correctly is missing.

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, but the description adds real meaning beyond the schema: it explains that decimals override the currency's standard minor units and that accounting renders negatives in parentheses. It does not clarify locale fallback or currency-case handling, which the schema only encodes as a regex.

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 and resource ('Formatea un monto en cualquier moneda ISO 4217') plus the locale-driven output variants (símbolo, código o nombre) and standard minor units. It explicitly names the sibling it is not (co-cop-format), so an agent can distinguish it from co-cop-parse, currency-info, number-format-locale and es-number-parse without opening a 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?

Uses explicit 'Cuándo' (money/tax/financial-math results needing exact, reproducible rounding and cents) and 'No para' with the named alternative co-cop-format. Both the inclusion and exclusion conditions are given, leaving nothing to inference.

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