VAT and sales tax
vat_sales_taxCalculate European Value Added Tax (VAT) and global sales taxes in either Add Mode (Net price to Gross price) or Remove Mode (Gross price to Net price) with statutory rate verification.
Behavior: Deterministic, idempotent calculation with zero external side effects. In 'add' mode: Tax = Amount * (Rate / 100), Total = Amount + Tax. In 'remove' mode: Net = Amount / (1 + Rate / 100), Tax = Amount - Net. Returns exact net, tax amount, and gross values rounded to 2 decimal places.
Usage Guidelines: Use for e-commerce, international invoicing, retail pricing, and VAT compliance calculations. Do not use for restaurant tipping and bill splits; use tip_splitter instead.
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": {
"amount": "<amount>",
"vatRatePercent": "<vatRatePercent>",
"as_of_date": "<as_of_date>"
},
"name": "vat_sales_tax"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Calculation mode: 'add' (also written 'exclusive') to append tax to a net amount, or 'remove' (also written 'inclusive') to extract embedded tax from a gross amount. Any other value is refused. | add |
| amount | Yes | Base monetary amount to calculate tax on (net amount in 'add' mode, gross price in 'remove' mode). Must be positive. | |
| as_of_date | Yes | Civil date YYYY-MM-DD. Selects the rule pack in force on that date. Required: the engine will not assume a date. | |
| vatRatePercent | Yes | VAT or sales tax rate in percent (0-100). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| metadata | No | ||
| rate_tier | No | ||
| disclaimer | No | ||
| net_amount | No | ||
| vat_amount | No | ||
| gross_amount | No | ||
| jurisdiction | No | ||
| rate_percent | No | ||
| effective_date | No | ||
| statutory_authority | No |