Calculate VAT
calculate_vatAdds VAT to a net amount or takes it out of a gross amount, in whole cents with a half rounded up, without floating point errors. Give the rate yourself (for example 21, 19 or 5.5); the tool does not look up the rate of a country.
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>",
"rate_percent": "<rate_percent>",
"mode": "<mode>"
},
"name": "calculate_vat"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | "add": amount is without VAT and VAT is added. "remove": amount includes VAT and VAT is taken out. | |
| amount | Yes | The amount, at most 99999999.99, with a dot as decimal sign, for example 1250.50. | |
| rate_percent | Yes | The VAT rate in percent, from 0 to 100, for example 21 or 5.5. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| net | No | ||
| vat | No | ||
| gross | No | ||
| reason | No | ||
| message | No | ||
| rate_percent | No |