Refunds and customs deadlines for many tax-free sales (CSV)
calculate_tax_free_refunds_csvRead 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
| Name | Required | Description | Default |
|---|---|---|---|
| csv | Yes | The CSV text, first line = headers. Example header: 販売日,レシート番号,商品名,税率,税抜金額 | |
| today | No | Today YYYY-MM-DD for near/late deadlines. Default today in Japan. | |
| feePct | No | Refund fee rate in percent. Default 0. | |
| feeBase | No | What the fee rate applies to. Default sale. | |
| feeFixed | No | Fixed fee per sale in yen. Default 0. | |
| feePayer | No | Who pays the fee. Default traveler. | |
| maxSales | No | How many sales to list in detail (sorted by deadline). Default 100. Totals always cover all. | |
| soonDays | No | A deadline within this many days counts as near. Default 14. | |
| defaultRate | No | Rate for rows without a tax rate. Default std (10%). |