Skip to main content
Glama

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.

MCP client
Glama
MCP server

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.

100% free. Your data is private.
Tool DescriptionsA

Average 4.6/5 across 3 of 3 tools scored.

Server CoherenceA
Disambiguation5/5

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.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case: create_invoice, download_document, query_job. No deviations.

Tool Count5/5

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.

Completeness5/5

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 tools
create_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateNoIssue date in Gregorian ISO "YYYY-MM-DD" (converted to the Buddhist-Era dateBE for you). Omit to use today. Or pass dateBE directly.
noteNoOptional note / remark printed on the document.
itemsYesLine items. Each: { description, quantity, unitPrice, discount?, vatRate? }.
dateBENoIssue date already in Buddhist-Era "dd/MM/yyyy" (e.g. 10/07/2569). Optional alternative to date.
numberYesYour invoice / document number (becomes the document "number"), e.g. INV-2026-000123. REQUIRED.
customerYesBuyer identification & address.
discountNoDocument-level discount in THB (optional). Forwarded to Leceipt; when > 0 the authoritative grand total is Leceipt's.
referenceNoOptional reference number shown on the document.
includeVatNotrue = the unitPrice values already INCLUDE VAT (server backs it out); false = prices are net, VAT added on top (default).
Behavior5/5

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.

Conciseness4/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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_documentA
Read-onlyIdempotent
Inspect

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
fileIdYesThe file_id returned by query_job when status is "complete".
Behavior5/5

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.

Conciseness3/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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_jobA
Read-onlyIdempotent
Inspect

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
jobIdYesThe job_id returned by create_invoice in live mode.
Behavior5/5

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.

Conciseness4/5

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.

Completeness5/5

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.

Parameters5/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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.

Discussions

No comments yet. Be the first to start the discussion!

Try in Browser

Your Connectors

Sign in to create a connector for this server.

Resources