Skip to main content
Glama
localecheck

localecheck

by qinisolabs

localecheck

Locale-correctness tools for AI agents. Agents are systematically wrong about everyday non-US data — they read 03/04 as March 4 in the UK, apply today's VAT rate to a historical invoice, format €1,234.50 for a German reader, and miss bank holidays in delivery dates. localecheck gives them verified answers and flags impossible inputs instead of guessing.

Coverage: UK + USA (v1), expanding. Free, no API key.

Packages

Package

Install

Use

TypeScript (primary)

packages/localecheck-ts

npx -y localecheck (live on npm)

MCP server and importable library

Python

packages/localecheck-python

from source (PyPI release coming soon)

MCP server, importable library, REST API

Both wrap the same authoritative libraries (libphonenumber, CLDR/Intl, date-holidays) and share the same hand-curated tax data.

Related MCP server: bizdays

What it does

parse_date · validate_phone · format_currency · tax_rate (VAT/sales-tax by date) · is_holiday / next_holiday · parse_address

Quick start (in an AI app)

{ "mcpServers": { "localecheck": { "command": "npx", "args": ["-y", "localecheck"] } } }

Then ask naturally — the agent picks the tool: "A UK invoice dated 1 June 2009 — what VAT rate?" → 15%.

Repo map

  • packages/localecheck-ts — primary TypeScript package (MCP + library)

  • packages/localecheck-python — Python package + FastAPI REST API

  • eval/ — benchmark harness: how often raw LLMs get this wrong

  • benchmark.html — shareable results page · BUSINESS_MODEL.md — strategy · PUBLISH.md — release steps · LOCAL_TEST.md — test before publishing

Status & caveats

UK VAT history is reliable for the modern era (standard rate). US state sales-tax values are 2025 state base rates (local taxes add on top) — verify against an authoritative feed before live invoicing. Addresses parse + extract a valid postcode/ZIP but don't verify deliverability.

Code: Apache-2.0. Curated tax data: see BUSINESS_MODEL.md.

Available Tools

7 tools
format_currencyA

Format a money amount the way a reader in a given locale expects (symbol position, decimal/thousands separators). USE THIS whenever you show a price/total to a user or put one in an email, invoice, or report. e.g. 1234.5 GBP en-GB -> '£1,234.50'.

Inputs: amount (required), currency, locale.

is_holidayA

Check whether a date (YYYY-MM-DD) is a public/bank holiday. USE THIS when computing business-day deadlines, delivery SLAs, or 'next working day'. GB defaults to England; pass subdiv 'SCT'/'WLS'/'NIR' or a US state code. Country is GB or US.

Inputs: date (required), country, subdiv.

next_holidayA

Find the next public/bank holiday on or after a date (default today). USE THIS to answer 'when is the next holiday' or find the next working day. Country is GB or US; subdiv narrows to a UK nation or US state.

Inputs: country, after, subdiv.

parse_addressA

Extract structured {country, postcode, city} from a free-text UK or US address. USE THIS when onboarding a user, running a KYC/fraud check, or storing an address, instead of splitting the string yourself. Returns a confidence flag.

Inputs: input (required).

parse_dateA

Convert a human-written date into ISO 8601 (YYYY-MM-DD). USE THIS whenever you need to interpret a date a person typed — especially ambiguous numeric dates like 03/04/2025, which mean different things in the UK (day-first) vs US (month-first) — before storing, scheduling, or acting on it. Pass locale 'en-GB' or 'en-US'. Returns valid:false for impossible dates.

Inputs: input (required), locale.

tax_rateA

Look up the correct consumption-tax rate. USE THIS before calculating VAT or sales tax on an invoice or quote — never recall the rate from memory, it is DATE-SENSITIVE. GB returns the UK standard VAT rate that applied on the given date (handles historical/temporary changes). US has no national VAT (returns 0); pass a state code like 'CA' for the state base sales-tax rate. Always pass the invoice date for GB.

Inputs: country, date, state.

validate_phoneA

Validate a phone number and normalise it to E.164 (e.g. +442079460958). USE THIS before saving a phone number, dialling, or sending an SMS, instead of trusting raw input. Pass region 'GB' or 'US'. Returns valid:false if the number is not real for that region.

Inputs: number (required), region.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool targets a distinct locale-related function (currency, holiday, address, date, tax, phone) with no overlap.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case, making the set predictable.

    Tool Count5/5

    Seven tools is well-scoped for a locale utility server, covering formatting, validation, and lookups without being excessive or too few.

    Completeness4/5

    Covers key locale operations (currency, dates, addresses, phones, holidays, taxes) but lacks timezone or unit conversion, which are minor gaps.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      The deterministic fact-verification layer for AI agents. Validates the structured facts an agent emits — IBANs, payment cards, VAT and national tax IDs, crypto and bank addresses, domains, emails, phone numbers, securities and academic identifiers, plus dates, currencies and holidays — against checksums and curated authoritative data, not guesses.
      56
      1
      Apache 2.0
    • A
      license
      A
      quality
      C
      maintenance
      Provides deterministic business-day calculations for AI agents, correctly handling country-specific weekends and public holidays.
      6
      49 npm
      1
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to look up, resolve, verify and sanctions-screen legal entities across the UK and Europe by merging company registries, GLEIF LEIs and VIES VAT data into one profile with per-field provenance. Supports KYB and due-diligence workflows through name and identifier search, officer and ownership tracing, filings and insolvency checks, and honest reporting of gaps, stale sources or unavailable data.
      9
      Elastic 2.0
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to look up a sourced, versioned dataset covering every country in Arabic, English, or both: names, nationalities, capitals, currencies, languages, time zones, dial codes, phone validation, address formats, and ISO 3166-2 subdivisions. Supports country search with Arabic-aware normalization, phone parsing to E.164, nationality selection, and subdivision lookups.
      786 npm
      -