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

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +]
  2. 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
  3. Changed1 schema field changed
    • removedInput schema / properties / vatRatePercent / default
      Removed value: -20
  4. 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)."
  5. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint false, so the safety profile is known. The description adds value by spelling out deterministic behavior, zero external side effects, the exact formulas for both modes, and the rounding to 2 decimals. It does not contradict annotations, though it could further clarify what 'statutory rate verification' means in practice.

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?

The description is well-organized into purpose, behavior, and usage sections without repetition. It is slightly verbose with the formula details, but every sentence serves a functional role (modes, formulas, output, usage boundaries). It could be trimmed, but it remains efficient and front-loaded with the main purpose.

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 tool with 4 parameters and no output schema, the description explains the expected return values (net, tax, gross rounded to 2 decimals), the modes, and the input date requirement. It omits error handling or edge cases, but for a deterministic calculator with schema coverage, it is adequately complete to guide correct invocation.

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% and each parameter already has a clear description (mode enum semantics, amount meaning per mode, date pattern, rate bounds). The description reinforces the meaning of amount and mode via formulas but does not add genuinely new parameter-level semantics beyond the schema. Baseline 3 is appropriate.

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

Purpose5/5

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

The description clearly states a specific verb+resource ('Calculate European Value Added Tax and global sales taxes') and elaborates with two modes (add/remove) and rate verification. It distinguishes the tool from tax siblings by specifying European VAT and global sales tax scope, and even names tip_splitter as the tool to use for tipping scenarios, making differentiation explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit use cases are listed ('e-commerce, international invoicing, retail pricing, and VAT compliance calculations') and a clear exclusion is given ('Do not use for restaurant tipping and bill splits') with a named alternative ('use tip_splitter instead'). This is exactly the when-to-use and when-not-to-use guidance the rubric rewards.

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