Skip to main content
Glama

VAT and sales tax

vat_sales_tax
Read-onlyIdempotent

Calculate 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoCalculation mode: 'add' to append tax to net amount, or 'remove' to extract embedded tax from gross amount.add
amountYesBase monetary amount to calculate tax on (net amount in 'add' mode, gross price in 'remove' mode). Must be positive.
as_of_dateYesCivil date YYYY-MM-DD. Selects the rule pack in force on that date. Required: the engine will not assume a date.
vatRatePercentYesVAT or sales tax rate in percent (0-100).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo
metadataNo
rate_tierNo
disclaimerNo
net_amountNo
vat_amountNo
gross_amountNo
jurisdictionNo
rate_percentNo
effective_dateNo
statutory_authorityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "disclaimer": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "effective_date": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "gross_amount": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "jurisdiction": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "metadata": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "mode": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "net_amount": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "rate_percent": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "rate_tier": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "statutory_authority": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "vat_amount": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / as_of_date
      Added value: +{
      +  "description": "Civil date YYYY-MM-DD. Selects the rule pack in force on that date. Required: the engine will not assume a date.",
      +  "example": "2026-09-26",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "amount",
      -  "vatRatePercent"
      -]New value: +[
      +  "amount",
      +  "vatRatePercent",
      +  "as_of_date"
      +]
  3. Changed4 schema fields changed
    • changedInput schema / properties / vatRatePercent / description
      Previous value: -"Tax rate in percent (e.g. 20 for UK/France, 19 for Germany, 21 for Spain, 8.25 for US state/local)."New value: +"VAT or sales tax rate in percent (0-100)."
    • addedInput schema / properties / vatRatePercent / example
      Added value: +20
    • addedInput schema / properties / vatRatePercent / maximum
      Added value: +100
    • addedInput schema / properties / vatRatePercent / minimum
      Added value: +0
  4. Changed1 schema field changed
    • removedInput schema / properties / vatRatePercent / default
      Removed value: -20
  5. Changed3 schema fields changed
    • changedInput schema / properties / amount / description
      Previous value: -"Monetary amount"New value: +"Base monetary amount to calculate tax on (net amount in 'add' mode, gross price in 'remove' mode). Must be positive."
    • changedInput schema / properties / mode / description
      Previous value: -"'add' to add VAT to net price, 'remove' to extract VAT from gross"New value: +"Calculation mode: 'add' to append tax to net amount, or 'remove' to extract embedded tax from gross amount."
    • changedInput schema / properties / vatRatePercent / description
      Previous value: -"Tax rate in % (e.g. 20 for UK/France, 19 for Germany)"New value: +"Tax rate in percent (e.g. 20 for UK/France, 19 for Germany, 21 for Spain, 8.25 for US state/local)."
  6. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered; the description adds the actual arithmetic in both modes and the 2-decimal rounding of returns, which is genuinely behavioral detail beyond the annotations. The 'statutory rate verification' claim is slightly opaque given the rate arrives as a user-supplied parameter.

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?

Front-loaded with purpose, then clearly labelled Behaviour and Usage Guidelines sections. The formulas are slightly verbose but each conveys a distinct, load-bearing fact; no filler sentences.

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?

For a single-purpose calculator with an output schema (so return values need no prose) and full parameter coverage, the description supplies modes, formulas, rounding and usage scope. Minor gaps remain around the statutory rate source implied by 'verification' and differentiation from the GST/income-tax siblings.

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 description coverage is 100%, so the schema already documents amount, vatRatePercent, as_of_date and the mode enum. The description's parameters section adds only marginal mapping (net vs gross meaning of amount per mode) and no new syntax or format detail beyond the schema, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Calculate European Value Added Tax (VAT) and global sales taxes') plus the add/remove mode scope. However, it does not differentiate against the actual tax siblings in this namespace (gst_regular, gst_composition, tax_in, tcs, tds) – its only named alternative, tip_splitter, is not a sibling tool.

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?

Gives explicit use contexts (e-commerce, international invoicing, retail pricing, VAT compliance) and an explicit exclusion with an alternative ('Do not use for restaurant tipping and bill splits; use tip_splitter instead'). The exclusion targets a tool outside the sibling set, so it does not help the agent route among the real tax siblings.

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