Skip to main content
Glama

format_number_european

Read-onlyIdempotent

Formats a number using the locale conventions of a specific European country, applying the correct decimal separator and thousands separator. Returns { original: number, formatted: string, locale: string, country_code: string }. Different European countries use different conventions — Portugal and most of continental Europe use '1.234,56' (dot as thousands, comma as decimal), while Ireland uses '1,234.56'. Supports PT, ES, FR, DE, IT, NL, BE, PL, SE, DK, FI, AT, IE, GR, HU, RO. Use when displaying prices, measurements, or any numeric value to end users in a specific European country.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberYesThe numeric value to format. Example: 1234.56
decimalsNoNumber of decimal places. Defaults to 2. Use 0 for whole numbers, 2 for prices.
country_codeYesTwo-letter country code for the target locale. Example: 'PT', 'FR', 'DE'

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / country_code / description
      Previous value: -"Two-letter country code. Example: 'PT', 'FR', 'DE'"New value: +"Two-letter country code for the target locale. Example: 'PT', 'FR', 'DE'"
    • changedInput schema / properties / decimals / description
      Previous value: -"Number of decimal places. Defaults to 2."New value: +"Number of decimal places. Defaults to 2. Use 0 for whole numbers, 2 for prices."
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": false,
      -  "properties": {
      -    "country_code": {
      -      "type": "string"
      -    },
      -    "formatted": {
      -      "type": "string"
      -    },
      -    "locale": {
      -      "type": "string"
      -    },
      -    "original": {
      -      "type": "number"
      -    }
      -  },
      -  "required": [
      -    "original",
      -    "formatted",
      -    "locale",
      -    "country_code"
      -  ],
      -  "type": "object"
      -}New value: +null
  2. Changed4 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / country_code / description
      Previous value: -"Two-letter country code for the target locale. Example: 'PT', 'FR', 'DE'"New value: +"Two-letter country code. Example: 'PT', 'FR', 'DE'"
    • changedInput schema / properties / decimals / description
      Previous value: -"Number of decimal places. Defaults to 2. Use 0 for whole numbers, 2 for prices."New value: +"Number of decimal places. Defaults to 2."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "country_code": {
      +      "type": "string"
      +    },
      +    "formatted": {
      +      "type": "string"
      +    },
      +    "locale": {
      +      "type": "string"
      +    },
      +    "original": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "original",
      +    "formatted",
      +    "locale",
      +    "country_code"
      +  ],
      +  "type": "object"
      +}
  3. Changed3 schema fields changed
    • changedInput schema / properties / country_code / description
      Previous value: -"Two-letter country code for the target locale. Example: 'PT' for Portugal"New value: +"Two-letter country code for the target locale. Example: 'PT', 'FR', 'DE'"
    • changedInput schema / properties / decimals / description
      Previous value: -"Number of decimal places to show. Defaults to 2. Example: 0 for whole numbers, 2 for prices"New value: +"Number of decimal places. Defaults to 2. Use 0 for whole numbers, 2 for prices."
    • changedInput schema / properties / number / description
      Previous value: -"The number to format. Example: 1234.56"New value: +"The numeric value to format. Example: 1234.56"
  4. Changed3 schema fields changed
    • changedInput schema / properties / country_code / description
      Previous value: -"Country code for formatting (PT, ES, DE, FR, etc)"New value: +"Two-letter country code for the target locale. Example: 'PT' for Portugal"
    • changedInput schema / properties / decimals / description
      Previous value: -"Number of decimal places (default 2)"New value: +"Number of decimal places to show. Defaults to 2. Example: 0 for whole numbers, 2 for prices"
    • changedInput schema / properties / number / description
      Previous value: -"The number to format"New value: +"The number to format. Example: 1234.56"
  5. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations establish read-only and idempotent behavior; description adds that it returns an object with original, formatted, locale, and country_code. It also discloses that different countries use different separators, giving concrete examples. This is valuable context beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with zero redundancy. Front-loads the action, includes a return type, examples, and supported countries. Everything earns its place.

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 simple formatting utility, the description covers purpose, usage, supported inputs, and output format. Since no output schema exists, the explicit return type is crucial and provided. No critical information 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 covers all three parameters with descriptions, so baseline is 3. The description adds the context of European decimal conventions and lists supported country codes, enriching the semantics of country_code. However, it doesn't add information about the 'number' or 'decimals' parameters beyond the schema, so a 4 is appropriate.

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?

The description clearly states the tool formats a number using European locale conventions, with a specific verb ('Formats') and resource. It distinguishes itself from sibling tools (holidays, VAT, validation) by being the only formatting tool, and further differentiates internal behavior by country. The description is unambiguous and specific.

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

Usage Guidelines4/5

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

Explicitly states 'Use when displaying prices, measurements, or any numeric value to end users in a specific European country', providing clear context. It also lists supported country codes and examples of conventions. While it doesn't mention alternatives, the sibling tools are clearly unrelated, so the guidance is sufficient.

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