Skip to main content
Glama

Japan Tax-Free Sales Checker for Shops

Refunds and customs deadlines for many tax-free sales (CSV)

calculate_tax_free_refunds_csv
Read-only

Read a sales record CSV from a register or online shop (only the tax-free sales), group rows by receipt number, and for every sale calculate the refund, fee, what the traveler receives, the 5,000-yen minimum and the customs confirmation deadline, sorted by deadline (the same reader as the site's CSV feature). Columns are found from their headers (sale date, receipt number, item name, tax rate, amount excluding or including tax, unit price, quantity). Returns totals, sales whose deadline is near or past, and resultCsv: the same list as CSV that a person can save and open in a spreadsheet. Do not include customer names or passport numbers. Estimates only, not individual tax advice. Actual fees depend on each tax-free system provider. Confirm individual cases with a tax accountant or the National Tax Agency tax counseling center. 結果は目安でございます。実際の料金は各社のお見積もりで、個別のお取扱いは税理士または国税の電話相談センターにご確認ください。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "csv": "<csv>"
    },
    "name": "calculate_tax_free_refunds_csv"
  }
}

Input Schema

NameRequiredDescriptionDefault
csvYesThe CSV text, first line = headers. Example header: 販売日,レシート番号,商品名,税率,税抜金額
todayNoToday YYYY-MM-DD for near/late deadlines. Default today in Japan.
feePctNoRefund fee rate in percent. Default 0.
feeBaseNoWhat the fee rate applies to. Default sale.
feeFixedNoFixed fee per sale in yen. Default 0.
feePayerNoWho pays the fee. Default traveler.
maxSalesNoHow many sales to list in detail (sorted by deadline). Default 100. Totals always cover all.
soonDaysNoA deadline within this many days counts as near. Default 14.
defaultRateNoRate for rows without a tax rate. Default std (10%).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Beyond readOnlyHint/openWorldHint the description discloses the grouping logic, the header-based column discovery, the sort order, and precisely what comes back (totals always cover all sales; resultCsv is a saveable spreadsheet). The disclaimer that actual fees depend on each provider's quote is real behavioral context, though it is stated twice in two languages rather than expanded.

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?

The opening sentence is well front-loaded and carries the operational content. However, the tail repeats the same disclaimer in English and then again in Japanese, and the multi-clause calculation sentence is dense enough to slow reading; tightening the duplicated caveat would cost nothing.

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?

No output schema exists, yet the description names the three return components (totals, near/past-deadline sales, resultCsv) and how columns are located, which is what an agent needs to call and interpret it. Missing only a note on what happens to malformed or header-less CSV input.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already carries all nine parameter meanings including defaults and enums. The description adds only indirect hints (header names, deadline sorting, the 5,000-yen minimum) and says nothing about feePct, feeBase, feeFixed, feePayer, soonDays, maxSales or defaultRate beyond what the schema states. Baseline 3 applies.

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 names a concrete verb chain (read a CSV, group by receipt number, calculate refund/fee/traveler amount/deadline, sort by deadline) and a concrete output (totals, near/past deadlines, resultCsv). The batch/CSV scope ("many tax-free sales", "same reader as the site's CSV feature") separates it from the single-sale sibling calculate_tax_free_refund.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an input constraint ("Do not include customer names or passport numbers") and states the results are estimates only, which implies when the tool is appropriate. But it never says when to prefer calculate_tax_free_refund or what_if_tax_free instead, so the agent has to infer routing from the CSV scope alone.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources