Skip to main content
Glama
wtigero

Thai Toolkit MCP

by wtigero

🇹🇭 Thai Toolkit MCP

Thai-specific utilities for AI agents — as a Model Context Protocol (MCP) server.

Give Claude (or any MCP client) the exact, rule-based Thai building blocks it gets wrong on its own: validate a national / tax ID, read an amount as Thai baht text, convert Buddhist-era (พ.ศ.) dates, compute 7% VAT and withholding tax, normalize Thai phone numbers, and look up provinces.

Every tool is a pure, offline function — no API keys, no network calls, deterministic results. Fast, private, and safe to run locally.

Why this exists

LLMs are unreliable at exact Thai tasks: they miscompute the national-ID checksum, misread baht text, and mishandle Buddhist-era years. This server moves those tasks to verified code, so the agent gets the right answer every time.

Related MCP server: thaibulksms

Tools

Tool

What it does

Example ask

thai_validate_id

Validate a 13-digit national / tax ID via checksum

"Is 1-1011-12345-67-8 a valid Thai ID?"

thai_baht_to_text

Read a THB amount in Thai (for invoices/cheques)

"Write ฿1,234.50 in Thai text"

thai_convert_date

Format / convert Gregorian ↔ Buddhist-era dates

"What is 2026-06-13 in Thai?"

thai_calculate_vat

Add / extract 7% VAT and withholding tax

"Extract VAT from a ฿1,070 invoice"

thai_format_phone

Normalize to local + E.164, classify mobile/landline

"Format +66 81 234 5678"

thai_lookup_province

Province info (Thai/English) and its region

"Which region is Phuket in?"

Install

git clone https://github.com/wtigero/thai-toolkit-mcp.git
cd thai-toolkit-mcp
pip install -e .

Connect it

Claude Desktop — add to claude_desktop_config.json:

{
  "mcpServers": {
    "thai-toolkit": {
      "command": "thai-mcp"
    }
  }
}

Claude Code:

claude mcp add thai-toolkit -- thai-mcp

Then ask: "อ่าน ฿1,234.50 เป็นตัวอักษรไทย" and the agent calls the tool.

Develop

pip install -e ".[dev]"
python -m pytest            # or: python tests/test_utils.py

License

MIT — see LICENSE.

Available Tools

6 tools
thai_baht_to_textA
Read-onlyIdempotent

Convert a baht amount to its Thai reading (e.g. 'หนึ่งพันบาทถ้วน').

Useful for invoices, receipts, and cheques.

Returns: JSON string: {"amount", "text"}

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint, destructiveHint, and idempotentHint. The description adds the return format (JSON with amount and text), which is not in annotations. However, edge cases like zero, satang, or large numbers are not mentioned.

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?

Three sentences with no redundancy. Purpose, use cases, and return format are presented in a front-loaded manner. Every sentence adds value.

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 simple conversion tool, the description covers purpose and output. It doesn't mention handling of satang or limit of input range, but given the output schema exists, this is acceptable. Slightly missing details on parameter behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% meaning the description adds no param info. The schema itself has a description for 'amount', but the tool description does not explain the parameter further, violating the expectation to compensate for low coverage.

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 action: 'Convert a baht amount to its Thai reading' with an example, and the resource is well-defined. It distinguishes from sibling tools which focus on other Thai-related conversions.

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?

The description mentions use cases ('invoices, receipts, and cheques') but does not explicitly say when not to use it or suggest alternatives. This provides context but lacks exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

thai_calculate_vatA
Read-onlyIdempotent

Add or extract 7% Thai VAT, and optionally compute withholding tax.

Returns: JSON string with {"base", "vat", "total"} and, if requested, a "withholding" object {"wht_rate_percent", "wht", "net_payment"}.

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true, indicating a safe, read-only calculation. The description adds valuable context about the return format (JSON with base, vat, total, and optional withholding), which goes beyond annotations without contradicting them.

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?

The description is extremely concise: two short sentences and a bullet list for returns. It front-loads the core action and provides structured return information without any superfluous words.

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?

The tool is simple, and the explanation of return values is adequate. The annotation and output schema (indicated as present) fill in remaining context. The description does not cover edge cases, but for a straightforward tax calculator, this level of detail is sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides descriptions for all four parameters (amount, mode, rate, withholding_rate_percent), effectively covering their meanings. The description adds little parameter-specific detail beyond the schema, so a baseline score of 3 is appropriate given the high schema description coverage.

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's function: 'Add or extract 7% Thai VAT, and optionally compute withholding tax.' It specifies the verb and resource (VAT and withholding tax), and the sibling tools are all distinct (baht to text, date conversion, etc.), so there is no ambiguity or overlap.

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?

The description implies usage for VAT calculations but does not explicitly provide when-to-use or when-not-to-use guidelines. However, the sibling tools are unrelated, so no exclusions are necessary, and the context is clear enough for an AI to infer appropriate use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

thai_convert_dateA
Read-onlyIdempotent

Format an ISO date as a Thai date string, or convert years CE<->BE.

Returns: JSON string. For 'format': {"input", "buddhist_year", "thai_date"}. For year conversion: {"input_year", "result_year", "era"}.

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, destructiveHint, idempotentHint. The description adds value by detailing the return JSON structure for both modes, which is beyond the annotations. However, it does not explicitly state safety or idempotency, but annotations cover that.

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?

The description is two sentences: the first states the primary purpose, the second lists return fields. It is front-loaded, concise, and every sentence adds value without redundancy.

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?

The description explains the return structure and the two modes, but does not cover edge cases or error handling. Given the tool's moderate complexity and the presence of output schema and annotations, the description is fairly complete for typical usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has detailed parameter descriptions, so the description adds limited new meaning beyond the schema. The description summarizes the two operation modes, which is slightly helpful, but the schema already explains each parameter. Baseline 3 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 an ISO date as a Thai date string or converts years CE/BE, distinguishing two modes. It uses specific verbs and resources, and naturally differentiates from siblings which are unrelated Thai utilities.

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

Usage Guidelines3/5

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

The description identifies two use cases (formatting or year conversion) but does not provide explicit guidance on when to use this tool over alternatives or when not to use it. Siblings are unrelated, so no direct comparison is needed, but the description could state that for date-related conversions this is the appropriate tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

thai_format_phoneA
Read-onlyIdempotent

Normalize a Thai phone number to local and E.164 forms and classify it.

Returns: JSON string: {"input", "local", "e164", "type", "valid"}

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior4/5

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

The description adds return structure (JSON with fields: input, local, e164, type, valid) beyond annotations, which do not mention output format. No contradictions with 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 no wasted words. First sentence states purpose, second lists return fields. Efficient and clear.

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?

Given a simple tool with one parameter and no nested objects, the description is adequate. It provides return fields, which is helpful. Could mention classification types but not necessary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema description coverage at 0% per context, the description should compensate but does not mention the phone_number parameter at all. The schema itself provides a description, but the rubric states the burden falls on the tool description when coverage is low.

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 that the tool normalizes and classifies a Thai phone number, specifying the verb 'normalize' and the resource 'phone number'. It distinguishes from sibling tools like thai_validate_id which is for validation, not formatting.

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

Usage Guidelines3/5

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

No explicit guidance on when to use this tool versus alternatives like thai_validate_id or other phone-related utilities. The context of use is implied but not stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

thai_lookup_provinceA
Read-onlyIdempotent

Look up a Thai province (Thai/English name) and its region.

Returns: JSON string: a single match {"thai", "english", "region_th", "region_en"}, a list of partial matches, or an error message if nothing matches.

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior4/5

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

Annotations declare readOnlyHint, idempotentHint, etc. Description adds return format details (JSON with thai, english, region fields, partial matches, error messages). No contradictions.

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?

Two sentences, clear and front-loaded. No wasted words. Could list return types more concisely, but overall efficient.

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?

Simple tool with 1 param; output schema exists (not shown). Description covers return shapes and error cases, fully sufficient for context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% per context. Description mentions 'Thai/English name' but does not elaborate on parameter structure beyond schema's own description of 'query'. Minimal added value for single param.

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?

Description clearly states verb 'Look up', resource 'Thai province', and scope 'Thai/English name and its region'. Sibling tools are different (baht, VAT, date, phone, ID), so distinction is clear.

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

Usage Guidelines3/5

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

No explicit instructions on when to use or avoid. Implied by purpose but no comparisons or exclusions. Siblings are distinct, reducing ambiguity, but guidance is missing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

thai_validate_idA
Read-onlyIdempotent

Validate a 13-digit Thai national ID or tax ID using the official checksum.

Returns: JSON string: {"input", "valid": bool, "formatted": str|null}

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior4/5

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

Annotations declare readOnlyHint and idempotentHint, which are consistent. Description adds that it uses an official checksum and returns a JSON with 'valid' and 'formatted' fields, providing behavioral context beyond annotations. No contradictions.

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 long, front-loaded with purpose and return type. No wasted text. Perfectly concise.

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 simple validation tool with one parameter and a return object, the description covers the validation method (checksum) and return fields. Annotations provide safety info. Output schema not provided but inline description covers it. Nearly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description for id_number parameter is clear ('Spaces/dashes are ignored'). Tool description does not add extra information about parameters beyond what the schema provides. With 0% schema_description_coverage (description doesn't mention params), the schema already covers the parameter well.

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?

Description clearly states it validates a 13-digit Thai national ID or tax ID using the official checksum. The verb 'validate' and specific resource distinguish it from sibling tools like thai_format_phone or thai_lookup_province.

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

Usage Guidelines3/5

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

Implies usage when validating a Thai national/tax ID, but no explicit when-to-use or when-not-to-use guidance. Sibling tools are different operations, so ambiguity is low, but lack of exclusions reduces score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 6 tool updatesv0.1.0
    • First observedthai_baht_to_text
    • First observedthai_calculate_vat
    • First observedthai_convert_date
    • First observedthai_format_phone
    • First observedthai_lookup_province
    • First observedthai_validate_id

TDQS

A4.2/5.0

Scored across 6 tools

Disambiguation5/5

Each tool targets a distinct aspect of Thai data (currency, tax, date, phone, province, ID) with no functional overlap. An agent can easily select the appropriate tool without ambiguity.

Naming Consistency5/5

All tools follow a consistent 'thai_verb_noun' pattern using snake_case, making the API predictable and easy to remember.

Tool Count5/5

Six tools cover a well-scoped set of common Thai-specific utilities without being too few or too many. Each tool serves a clear purpose.

Completeness4/5

The tool set addresses core Thai localization needs (currency, tax, date, phone, location, ID). Minor gaps exist (e.g., address formatting, income tax) but are acceptable for a focused toolkit.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    MCP server for ThaiBulkSMS and ThaiBulkMail APIs, enabling SMS, email, credit check, and OTP operations through natural language.
    8
    6
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    MCP server exposing Thailand data tools including official company-registry lookups, Thai address normalization, public holidays, and VAT/withholding-tax reference.
    5
    84
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    A remote MCP server that lets any AI agent accept PromptPay QR, credit/debit cards, TrueMoney wallet, internet banking payments in Thailand, and check payment status.
    MIT