Your AI agent rounds Japanese consumption tax per line. Japan says round once per rate.
If you let an AI agent draft invoices for Japanese customers, check one thing: how it rounds consumption tax. Since October 2023, a "qualified invoice" in Japan must round the tax once per invoice for each tax rate , not line by line ( National Tax Agency pamphlet, Japanese ). Language models tend

If you let an AI agent draft invoices for Japanese customers, check one thing: how it rounds consumption tax.
Since October 2023, a "qualified invoice" in Japan must round the tax once per invoice for each tax rate, not line by line ( National Tax Agency pamphlet, Japanese ). Language models tend to compute the tax on every line and add it up. On a small invoice that is already off by two yen:
Two yen sounds small. For the accounting team it means the invoice does not match their books, and someone has to find out why.
JP Invoice Check is a small MCP server, CLI and Agent Skill (Python standard library only, no network, MIT). It checks the six items a qualified invoice must carry, the 8% reduced-rate marks, the totals per rate, and the rounding rule. It names the per-line mistake ( E_TAX_LINE_ROUNDING ) separately from other wrong numbers, and every message comes in English and Japanese.
A reader pointed out that a check is worth little if the agent being checked can rewrite it. Version 0.2.0 follows that advice:
pip install "git+https://github.com/ayatrader/jp-invoice-check" Enter fullscreen mode Exit fullscreen mode { "mcpServers": { "jp-invoice-check": { "command": "jp-invoice-check", "args": [ "--policy", "/etc/company/invoice_policy.json" ]}}} Enter fullscreen mode Exit fullscreen mode For an invoice a supplier sent you ( role: receive ), a different rounding method is legal, so it is a warning that says which method they used and the difference in yen.
https://github.com/ayatrader/jp-invoice-check
Limits: it does not check whether a registration number is currently registered (that needs the NTA site), and it does not cover simplified invoices. It is a checking tool, not tax advice.