Thailand e-Tax Invoices (Leceipt create, poll & download)
Server Details
Thailand Leceipt e-Tax: AI agents create, poll and download e-Tax Invoices, stateless BYO.
- Status
- Unhealthy
- Last Tested
- Transport
- Streamable HTTP
- URL
Glama MCP Gateway
Connect through Glama MCP Gateway for full control over tool access and complete visibility into every call.
Full call logging
Every tool call is logged with complete inputs and outputs, so you can debug issues and audit what your agents are doing.
Tool access control
Enable or disable individual tools per connector, so you decide what your agents can and cannot do.
Managed credentials
Glama handles OAuth flows, token storage, and automatic rotation, so credentials never expire on your clients.
Usage analytics
See which tools your agents call, how often, and when, so you can understand usage patterns and catch anomalies.
Tool Definition Quality
Average 4.6/5 across 3 of 3 tools scored.
Each tool has a clearly distinct purpose: creating an invoice, polling a job status, and downloading a completed document. There is no overlap or ambiguity.
All tool names follow a consistent verb_noun pattern in snake_case: create_invoice, download_document, query_job. No deviations.
The server has exactly 3 tools, which perfectly cover the core workflow (create, poll, download) without unnecessary extras. This is well-scoped for the domain.
The tools cover the entire lifecycle of e-Tax invoice creation: create, poll for completion, and download the signed document. No obvious gaps for the stated purpose.
Available Tools
3 toolscreate_invoiceAInspect
Create a Thai e-Tax Invoice / Tax Invoice (ใบกำกับภาษี) through Leceipt — the POST /etax/documents/invoices-taxinvoices call. You pass the buyer + line items in plain fields; this server computes the Thai VAT 7% math locally (to show you the totals and enforce the owner amount policy), assembles the Leceipt document, and — in live mode — submits it. Leceipt then SIGNS it with your account certificate (CA) and files it with the Thai Revenue Department, returning a JOB you poll with query_job. In x-leceipt-mode=test (the default) NOTHING is submitted: you get the computed totals + the exact assembled payload back (a local dry-run) so you can review before going live. Result (live): accepted=true with a job_id -> poll query_job until status "complete", then download_document. percentVat per line is 7 / 0 / -1 only. Credential header (set once in your MCP client, per-request, never stored): x-leceipt-api-key = the API key you generated in your OWN Leceipt account (Settings -> "Connection to API" -> "Generating API Key"; self-signup at my.leceipt.com/signup). Your company profile and signing certificate (CA — TDID/INET) live inside YOUR Leceipt account — this server never sees them. Mode header x-leceipt-mode: test (default = LOCAL dry-run, assembles + computes VAT but does NOT submit; Leceipt has no sandbox host) | live (submits to Leceipt -> Thai Revenue Department, real fiscal effect; requires x-leceipt-api-key). Optional owner-policy headers x-agentpay-max-amount / x-agentpay-approval-above / x-agentpay-allowed-tools.
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Issue date in Gregorian ISO "YYYY-MM-DD" (converted to the Buddhist-Era dateBE for you). Omit to use today. Or pass dateBE directly. | |
| note | No | Optional note / remark printed on the document. | |
| items | Yes | Line items. Each: { description, quantity, unitPrice, discount?, vatRate? }. | |
| dateBE | No | Issue date already in Buddhist-Era "dd/MM/yyyy" (e.g. 10/07/2569). Optional alternative to date. | |
| number | Yes | Your invoice / document number (becomes the document "number"), e.g. INV-2026-000123. REQUIRED. | |
| customer | Yes | Buyer identification & address. | |
| discount | No | Document-level discount in THB (optional). Forwarded to Leceipt; when > 0 the authoritative grand total is Leceipt's. | |
| reference | No | Optional reference number shown on the document. | |
| includeVat | No | true = the unitPrice values already INCLUDE VAT (server backs it out); false = prices are net, VAT added on top (default). |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Description discloses test mode dry-run behavior, live submission to Thai Revenue Department, local VAT computation, credential handling (header, never stored), and owner-policy headers. Annotations provide minimal info, so description carries full burden and excels.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is fairly long but every sentence adds important operational detail. It front-loads the main purpose and then flows through mode, credentials, and post-creation steps. Could be slightly more concise but effective.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description explains return values (accepted, job_id) and next steps (poll query_job, download_document). It covers credential setup, two modes with headers, and optional owner-policy headers. Comprehensive for a complex tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions. Description adds value by explaining VAT rates (7/0/-1), includeVat semantics, and document-level discount impact. It provides context beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it creates a Thai e-Tax Invoice / Tax Invoice through Leceipt, specifying the endpoint and main actions (compute VAT, assemble, submit). It distinguishes from siblings (download_document, query_job) by explaining the post-creation flow.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explains test vs live modes, credential setup, and how to use headers. It implicitly guides when to use via mode switching and polling, but does not explicitly exclude other tools. Overall clear context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
download_documentARead-onlyIdempotentInspect
Download a finished Thai e-Tax document (PDF/XML) by its fileId — the GET /etax/files/{fileId} call. Use the file_id returned by query_job once its status is "complete". Returns { content_type, size_bytes, content_base64 } — base64-decode content_base64 to get the file bytes (the signed PDF/XML you hand to the buyer / keep for the Revenue Department). Requires x-leceipt-api-key. Credential header (set once in your MCP client, per-request, never stored): x-leceipt-api-key = the API key you generated in your OWN Leceipt account (Settings -> "Connection to API" -> "Generating API Key"; self-signup at my.leceipt.com/signup). Your company profile and signing certificate (CA — TDID/INET) live inside YOUR Leceipt account — this server never sees them. Mode header x-leceipt-mode: test (default = LOCAL dry-run, assembles + computes VAT but does NOT submit; Leceipt has no sandbox host) | live (submits to Leceipt -> Thai Revenue Department, real fiscal effect; requires x-leceipt-api-key). Optional owner-policy headers x-agentpay-max-amount / x-agentpay-approval-above / x-agentpay-allowed-tools.
| Name | Required | Description | Default |
|---|---|---|---|
| fileId | Yes | The file_id returned by query_job when status is "complete". |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Goes well beyond annotations by detailing the return format ({content_type, size_bytes, content_base64}), base64-decoding necessity, authentication (x-leceipt-api-key), mode headers, and privacy of company profile. 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is thorough but verbose, including lengthy header and authentication details that could be condensed. Still front-loads key purpose and is well-organized.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, description explains return format, decoding steps, and header usage. Covers most aspects for correct usage, though missing error handling for invalid fileId.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with fileId description. The description reinforces that fileId comes from query_job on completion and adds context about return format and decoding, adding moderate value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Download a finished Thai e-Tax document (PDF/XML) by its fileId', specifying the verb (download), resource (e-Tax document), and identifier (fileId). It distinguishes from siblings (create_invoice, query_job) by linking to query_job's completion.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly instructs to use file_id from query_job once status is 'complete'. Provides context on mode headers (test/live) and credential header requirements. Lacks explicit 'when not to use' but context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
query_jobARead-onlyIdempotentInspect
Poll the status of a Leceipt document job — the GET /etax/jobs/{id} call. Use the job_id returned by create_invoice (live mode). status enum: "processing" (Leceipt is still creating/signing the document) | "complete" (finished — the file is ready). When complete, the result carries file_id which you pass to download_document. Requires x-leceipt-api-key (this always hits Leceipt, so a key is needed even though the default mode is test). Credential header (set once in your MCP client, per-request, never stored): x-leceipt-api-key = the API key you generated in your OWN Leceipt account (Settings -> "Connection to API" -> "Generating API Key"; self-signup at my.leceipt.com/signup). Your company profile and signing certificate (CA — TDID/INET) live inside YOUR Leceipt account — this server never sees them. Mode header x-leceipt-mode: test (default = LOCAL dry-run, assembles + computes VAT but does NOT submit; Leceipt has no sandbox host) | live (submits to Leceipt -> Thai Revenue Department, real fiscal effect; requires x-leceipt-api-key). Optional owner-policy headers x-agentpay-max-amount / x-agentpay-approval-above / x-agentpay-allowed-tools.
| Name | Required | Description | Default |
|---|---|---|---|
| jobId | Yes | The job_id returned by create_invoice in live mode. |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Adds substantial context beyond annotations: required API key, mode headers, status behavior, and that test mode is a dry run.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Packed with useful info but slightly verbose; could be more structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers all essential aspects: purpose, usage, parameters, headers, status values, and result handling.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Adds meaning beyond schema by clarifying jobId comes from create_invoice in live mode.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the tool polls the status of a Leceipt document job, distinct from create_invoice and download_document.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says to use job_id from create_invoice, explains status enum, and describes when to proceed to download_document.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Claim this connector by publishing a /.well-known/glama.json file on your server's domain with the following structure:
{
"$schema": "https://glama.ai/mcp/schemas/connector.json",
"maintainers": [{ "email": "your-email@example.com" }]
}The email address must match the email associated with your Glama account. Once published, Glama will automatically detect and verify the file within a few minutes.
Control your server's listing on Glama, including description and metadata
Access analytics and receive server usage reports
Get monitoring and health status updates for your server
Feature your server to boost visibility and reach more users
For users:
Full audit trail – every tool call is logged with inputs and outputs for compliance and debugging
Granular tool control – enable or disable individual tools per connector to limit what your AI agents can do
Centralized credential management – store and rotate API keys and OAuth tokens in one place
Change alerts – get notified when a connector changes its schema, adds or removes tools, or updates tool definitions, so nothing breaks silently
For server owners:
Proven adoption – public usage metrics on your listing show real-world traction and build trust with prospective users
Tool-level analytics – see which tools are being used most, helping you prioritize development and documentation
Direct user feedback – users can report issues and suggest improvements through the listing, giving you a channel you would not have otherwise
The connector status is unhealthy when Glama is unable to successfully connect to the server. This can happen for several reasons:
The server is experiencing an outage
The URL of the server is wrong
Credentials required to access the server are missing or invalid
If you are the owner of this MCP connector and would like to make modifications to the listing, including providing test credentials for accessing the server, please contact support@glama.ai.
Discussions
No comments yet. Be the first to start the discussion!