Skip to main content
Glama
ayatrader

jp-invoice-check

by ayatrader

Check a Japanese qualified invoice (適格請求書)

jp_invoice_check
Read-onlyIdempotent

Validate a Japanese qualified invoice against the six required NTA items, reduced-rate markings, per-rate totals, and once-per-invoice tax rounding to catch line-by-line rounding mistakes.

Instructions

Check a Japanese qualified invoice against the six required items of the National Tax Agency (issuer name + registration number, date, description with reduced-rate marks, total per rate, tax per rate, buyer name) and the rounding rule: consumption tax is rounded ONCE per invoice per rate, not per line. Catches the common mistake of summing per-line rounded tax. Input: issuer{name, registration_number}, date, buyer{name}, price_basis (exclusive|inclusive), items[{description, amount, rate 10|8, reduced}], totals[{rate, amount, tax}], optional rounding (floor|half_up|ceil). Returns ok, errors and warnings (code, field, message in English and Japanese), required_items, by_rate (expected tax for each rounding). Offline: it does not check whether the number is currently registered. 適格請求書の6項目と端数処理を検査。

Input Schema

NameRequiredDescriptionDefault
invoiceYesThe invoice as described above

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the read-only, idempotent, non-destructive annotations, the description discloses the offline limitation, the specific rounding behavior it enforces, the common mistake it catches, and the structure of returned errors, warnings, required items, and per-rate expected tax. This is substantial behavioral context that annotations alone do not provide.

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 front-loaded with the core check and then systematically covers required items, rounding, input shape, returns, and the offline limitation. It is dense and useful, though the final Japanese sentence largely repeats the opening purpose and the long parenthetical item list is heavy, so it is not maximally concise.

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?

For a complex validation tool with no output schema and a nested input object, the description supplies both the domain rules and the return-value structure. It clarifies the offline scope, the six required items, rounding behavior, and output fields, leaving no major operational gap for an agent to call it correctly.

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?

Although the schema reports 100% description coverage, the top-level schema only describes the invoice object as 'as described above.' The real parameter semantics live in the description, which defines issuer fields, date, buyer, price_basis enum values, items with rate and reduced flag, totals by rate, and optional rounding options. This is essential and adds meaning well 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 states a specific verb and resource: checking a Japanese qualified invoice against six required NTA items and the per-rate rounding rule. It explicitly distinguishes itself from registration verification by noting it is offline and does not check whether the registration number is currently valid, which separates it from the jp_invoice_registration_number sibling.

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 gives clear context for when to use the tool: validating qualified invoice fields and catching the per-line versus per-invoice rounding error. It also clarifies an important exclusion by saying it does not verify current registration status, implicitly routing that need elsewhere. It does not explicitly compare against jp_invoice_tax, so it falls short of full alternative guidance.

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