<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: NEXUS tools</title>
    <description>The latest articles on DEV Community by NEXUS tools (@japanaitools).</description>
    <link>https://dev.to/japanaitools</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4222469%2Fe976ce96-c877-48dc-8ccd-f09f5f3cb168.png</url>
      <title>DEV Community: NEXUS tools</title>
      <link>https://dev.to/japanaitools</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/japanaitools"/>
    <language>en</language>
    <item>
      <title>Your AI agent rounds Japanese consumption tax per line. Japan says round once per rate.</title>
      <dc:creator>NEXUS tools</dc:creator>
      <pubDate>Mon, 02 Nov 2026 14:23:29 +0000</pubDate>
      <link>https://dev.to/japanaitools/your-ai-agent-rounds-japanese-consumption-tax-per-line-japan-says-round-once-per-rate-f87</link>
      <guid>https://dev.to/japanaitools/your-ai-agent-rounds-japanese-consumption-tax-per-line-japan-says-round-once-per-rate-f87</guid>
      <description>&lt;p&gt;If you let an AI agent draft invoices for Japanese customers, check one thing: how it rounds consumption tax.&lt;/p&gt;

&lt;p&gt;Since October 2023, a "qualified invoice" in Japan must round the tax &lt;strong&gt;once per invoice for each tax rate&lt;/strong&gt;, not line by line (&lt;a href="https://www.nta.go.jp/publication/pamph/shohi/shohizei_11.pdf" rel="noopener noreferrer"&gt;National Tax Agency pamphlet, Japanese&lt;/a&gt;). 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:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item (10%, tax excluded)&lt;/th&gt;
&lt;th&gt;Amount&lt;/th&gt;
&lt;th&gt;Tax rounded per line&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Copy paper&lt;/td&gt;
&lt;td&gt;1,999&lt;/td&gt;
&lt;td&gt;199&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Toner&lt;/td&gt;
&lt;td&gt;2,999&lt;/td&gt;
&lt;td&gt;299&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pens&lt;/td&gt;
&lt;td&gt;999&lt;/td&gt;
&lt;td&gt;99&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total&lt;/td&gt;
&lt;td&gt;5,997&lt;/td&gt;
&lt;td&gt;597 (should be 599)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two yen sounds small. For the accounting team it means the invoice does not match their books, and someone has to find out why.&lt;/p&gt;

&lt;h2&gt;
  
  
  A checker that computes instead of guessing
&lt;/h2&gt;

&lt;p&gt;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 (&lt;code&gt;E_TAX_LINE_ROUNDING&lt;/code&gt;) separately from other wrong numbers, and every message comes in English and Japanese.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the checker out of the agent's reach
&lt;/h2&gt;

&lt;p&gt;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:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The company rule (rounding method, tax included or excluded) is loaded once, when a person starts the server. No tool call can change it.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;rounding&lt;/code&gt; field inside the invoice is ignored while a rule is loaded.&lt;/li&gt;
&lt;li&gt;Every result carries a sha256 fingerprint of the checking code.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s2"&gt;"git+https://github.com/ayatrader/jp-invoice-check"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"jp-invoice-check"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"jp-invoice-check"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"--policy"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/etc/company/invoice_policy.json"&lt;/span&gt;&lt;span class="p"&gt;]}}}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For an invoice a supplier sent you (&lt;code&gt;role: receive&lt;/code&gt;), a different rounding method is legal, so it is a warning that says which method they used and the difference in yen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/ayatrader/jp-invoice-check" rel="noopener noreferrer"&gt;https://github.com/ayatrader/jp-invoice-check&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

</description>
      <category>python</category>
      <category>ai</category>
      <category>mcp</category>
      <category>japan</category>
    </item>
  </channel>
</rss>
