Skip to main content
Glama

ScorpTech x402 Tools

Currency Format

currency_format
Read-onlyIdempotent

Money formatting and math with CLDR data (ICU 78 / CLDR 48, matches Intl.NumberFormat): format an amount for any of 60 locales and 154 active ISO 4217 currencies (symbol, narrow symbol or code; standard or accounting negatives; Indian lakh grouping, Swiss apostrophes, RTL marks), round with 9 modes or cash rounding (CHF 0.05), parse a formatted string such as "1.234,56 €" or "(US$1,234.50)" back to an exact amount and currency, split an amount by ratios without losing a cent (largest remainder) and look up currency or country info (digits, symbols, cash rounding, countries). Exact decimal arithmetic, no floats. Returns JSON with: formatted, amount, currency, locale, digits, minorUnits, rounded, rounding. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: GET https://scorptech.it.com/api/x402/v1/currency-format

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "currency_format"
  }
}

Input Schema

NameRequiredDescriptionDefault
cashNoUse cash rounding (CHF/CAD 0.05, DKK 0.50)
modeNoformat
signNostandard
textNoparse: the formatted money string
amountNoDecimal amount, e.g. 1234.5 or -0.005 (format / allocate)
digitsNoOverride the currency's fraction digits
localeNoen-US, de-DE, fr-CH, ja-JP, hi-IN ... or just a languageen-US
ratiosNoallocate: weights, e.g. 1,1,1 or 50,30,20
countryNoISO 3166 country: use its currency (info: list it)
displayNosymbol
currencyNoISO 4217 code (default: the locale's country currency)
roundingNohalfExpand

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, open-world behavior, and the description adds useful details beyond that: exact decimal arithmetic with no floats, returned JSON fields, and per-call x402 pricing. It does not cover error behavior or rate limits, but it gives strong operational context for a read-only computational tool.

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?

The description is dense but front-loads the core purpose and packs relevant details about modes, locales, currencies, rounding, returns, and pricing. The long semicolon-heavy paragraph is readable and mostly earns its place, though breaking it into clearer mode-oriented structure would improve scanability.

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?

For a 12-parameter tool with no output schema, the description supplies the key missing context: supported operations, exact decimal behavior, returned JSON fields, pricing, and transport endpoint. Some mode-specific output nuances remain implicit, but the definition is sufficient for correct tool selection and invocation.

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 67%, and the description adds meaningful mode-level semantics beyond the schema: format versus parse versus allocate versus info, examples for text and amount inputs, cash rounding, and ratio splitting. It does not explain every parameter interaction, but it materially clarifies how the main parameters are used.

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 states a specific verb and resource: money formatting and math using CLDR data, with concrete modes for format, parse, allocate, and info. It clearly distinguishes currency-focused formatting and decimal math from generic arithmetic or formatting siblings by naming locales, ISO currencies, rounding, parsing, and allocation.

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?

It gives clear task contexts by enumerating format, parse, allocate, and lookup operations with examples such as parsing '1.234,56 €' and splitting by ratios. It does not explicitly say when not to use the tool or name alternatives, so it falls short of full when/when-not 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