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.

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

NameRequiredDescriptionDefault
modeNoCalculation 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
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

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. Changed2 schema fields changed
    • changedInput schema / properties / mode / description
      Previous value: -"Calculation mode: 'add' to append tax to net amount, or 'remove' to extract embedded tax from gross amount."New value: +"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."
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "add",
      -  "remove"
      -]New value: +[
      +  "add",
      +  "remove",
      +  "exclusive",
      +  "inclusive"
      +]
  2. 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"
      +}
  3. 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"
      +]
  4. 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
  5. Changed1 schema field changed
    • removedInput schema / properties / vatRatePercent / default
      Removed value: -20
  6. 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)."
  7. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the 'deterministic, zero side effects' sentence largely restates structured data. The value-add is the explicit formulas and 2-decimal rounding, but that is modest given how much the annotations already cover.

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?

Three labeled sections with the main purpose front-loaded and the formulas earning their place. Some redundancy with the annotations ('zero external side effects', 'idempotent') is the only wasted wording.

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?

An output schema exists, yet the description's return-value summary (net, tax, gross at 2dp) complements it usefully, and the date-driven rule pack is noted. Adequate for a deterministic calculator; only sibling disambiguation is missing.

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 each parameter is already documented including mode aliases and the as_of_date rule-pack behavior. The description restates the mode directionality but adds no syntax or constraint detail beyond the schema, matching the baseline.

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 VAT and global sales taxes') and enumerates both directions (net→gross, gross→net). It doesn't distinguish itself from the closely related tax siblings such as gst_regular, gst_composition, or tax_in, leaving the agent to infer which tax tool applies where.

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 concrete use contexts (e-commerce, invoicing, retail pricing, VAT compliance) and an explicit exclusion routing to tip_splitter for tipping/bill splits. It omits any guidance versus the many sibling tax calculators, so the when-not coverage is partial.

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