Skip to main content
Glama

UK Duty & VAT Calculator

uk_duty_calculator
Read-onlyIdempotent

Estimate UK import duty and VAT for a commodity code using the LIVE GOV.UK Trade Tariff — rates are fetched per request, not from a static table. The CIF value is composed from customs_value + freight_cost + insurance_cost; duty = CIF x the duty rate for the origin country; VAT (typically 20%) applies on the duty-inclusive value.

Provide commodity_code (a declarable 10-digit code), origin_country (ISO-2) and customs_value in GBP; freight_cost, insurance_cost and incoterm are optional refinements.

Behavior: live lookup plus deterministic arithmetic on the returned rate; a 6- or 8-digit code is refused — never padded with zeros to a code you did not send — with declarable_codes, the 10-digit codes beneath it in the UK Trade Tariff (610910 → 6109100010, 6109100090); an origin that is not an ISO 3166-1 country is refused; origin-dependent measures the tariff cannot resolve automatically surface in warnings. Rate-limited: a limit error carries reset_at, the UTC time the allowance resets.

Returns: commodity_code and description, origin country, cif_value, duty_rate (+ percent), duty_amount, vat_rate, vat_amount, total_import_taxes, total_landed_cost and warnings under result (amounts in GBP); validity.as_of marks the live-rate timestamp; plus confidence, _source and citation (the FreightUtils v1 response envelope). Field names as this package serves them (snake_case); the hosted /api/mcp endpoint serves the same fields in camelCase (e.g. total_cbm → totalCbm).

Limitations: an estimate, not a customs ruling — excise, quotas, anti-dumping measures, reliefs and origin-proof requirements can change the outcome; confirm with a customs broker or HMRC before relying on it.

Related: hs_code_lookup (find the 6-digit code first), incoterms_lookup (who actually pays these costs).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
incotermNoIncoterm basis
freight_costNoFreight cost in GBP, 0 or more (default 0)
customs_valueYesCustoms value in GBP
commodity_codeYesUK tariff commodity code — a declarable 10 digits, spaces allowed (a 6- or 8-digit code is refused with the declarable codes beneath it)
insurance_costNoInsurance cost in GBP, 0 or more (default 0)
origin_countryYesISO 2-letter country of origin (e.g. "CN", "US")

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
resultYes
_sourceYes
citationYes
validityNo
warningsNo
confidenceYes
blocking_errorsNo
envelope_versionYes
normalized_inputNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed2 schema fields changed
    • changedInput schema / properties / commodity_code / description
      Previous value: -"UK tariff commodity code (6-10 digits)"New value: +"UK tariff commodity code — a declarable 10 digits, spaces allowed (a 6- or 8-digit code is refused with the declarable codes beneath it)"
    • changedInput schema / properties / commodity_code / pattern
      Previous value: -"^\\d{6,10}$"New value: +"^[\\d\\s]{6,14}$"
  3. Changed4 schema fields changed
    • changedInput schema / properties / freight_cost / description
      Previous value: -"Freight cost in GBP (default 0)"New value: +"Freight cost in GBP, 0 or more (default 0)"
    • addedInput schema / properties / freight_cost / minimum
      Added value: +0
    • changedInput schema / properties / insurance_cost / description
      Previous value: -"Insurance cost in GBP (default 0)"New value: +"Insurance cost in GBP, 0 or more (default 0)"
    • addedInput schema / properties / insurance_cost / minimum
      Added value: +0
  4. Changed5 schema fields changed
    • addedOutput schema / properties / _source / properties / authority_current_edition
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / _source / properties / checked_at
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / _source / properties / dataset_edition
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / envelope_version / const
      Removed value: -"1"
    • addedOutput schema / properties / envelope_version / enum
      Added value: +[
      +  "1",
      +  "1.1"
      +]
  5. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "_source": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "checked": {
      +          "type": "string"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "provenance_status": {
      +          "enum": [
      +            "verified",
      +            "pending-verification",
      +            "computed",
      +            "live"
      +          ],
      +          "type": "string"
      +        },
      +        "source_url": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "checked",
      +        "provenance_status"
      +      ],
      +      "type": "object"
      +    },
      +    "blocking_errors": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "message": {
      +            "type": "string"
      +          },
      +          "recovery": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "action": {
      +                "type": "string"
      +              },
      +              "params": {
      +                "additionalProperties": {},
      +                "propertyNames": {
      +                  "type": "string"
      +                },
      +                "type": "object"
      +              },
      +              "tool": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "action"
      +            ],
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message",
      +          "recovery"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "citation": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "qualifier": {
      +          "type": "string"
      +        },
      +        "text": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "text"
      +      ],
      +      "type": "object"
      +    },
      +    "confidence": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "basis": {
      +          "enum": [
      +            "deterministic",
      +            "provenance",
      +            "match_quality",
      +            "freshness"
      +          ],
      +          "type": "string"
      +        },
      +        "level": {
      +          "enum": [
      +            "high",
      +            "medium",
      +            "low"
      +          ],
      +          "type": "string"
      +        },
      +        "score": {
      +          "maximum": 1,
      +          "minimum": 0,
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "level",
      +        "basis"
      +      ],
      +      "type": "object"
      +    },
      +    "envelope_version": {
      +      "const": "1",
      +      "type": "string"
      +    },
      +    "normalized_input": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    },
      +    "result": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "validity": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "as_of": {
      +          "type": "string"
      +        },
      +        "effective_from": {
      +          "type": "string"
      +        },
      +        "effective_to": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        }
      +      },
      +      "required": [
      +        "as_of"
      +      ],
      +      "type": "object"
      +    },
      +    "warnings": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "details": {
      +            "additionalProperties": {},
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "message": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "envelope_version",
      +    "ok",
      +    "result",
      +    "confidence",
      +    "_source",
      +    "citation"
      +  ],
      +  "type": "object"
      +}
  6. Changed2 schema fields changed
    • addedInput schema / properties / commodity_code / pattern
      Added value: +"^\\d{6,10}$"
    • addedInput schema / properties / origin_country / pattern
      Added value: +"^[A-Za-z]{2}$"
  7. Changed11 schema fields changed
    • removedInput schema / properties / commodityCode
      Removed value: -{
      -  "description": "UK tariff commodity code (6-10 digits)",
      -  "type": "string"
      -}
    • addedInput schema / properties / commodity_code
      Added value: +{
      +  "description": "UK tariff commodity code (6-10 digits)",
      +  "type": "string"
      +}
    • removedInput schema / properties / customsValue
      Removed value: -{
      -  "description": "Customs value in GBP",
      -  "exclusiveMinimum": 0,
      -  "type": "number"
      -}
    • addedInput schema / properties / customs_value
      Added value: +{
      +  "description": "Customs value in GBP",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • removedInput schema / properties / freightCost
      Removed value: -{
      -  "description": "Freight cost in GBP (default 0)",
      -  "type": "number"
      -}
    • addedInput schema / properties / freight_cost
      Added value: +{
      +  "description": "Freight cost in GBP (default 0)",
      +  "type": "number"
      +}
    • removedInput schema / properties / insuranceCost
      Removed value: -{
      -  "description": "Insurance cost in GBP (default 0)",
      -  "type": "number"
      -}
    • addedInput schema / properties / insurance_cost
      Added value: +{
      +  "description": "Insurance cost in GBP (default 0)",
      +  "type": "number"
      +}
    • removedInput schema / properties / originCountry
      Removed value: -{
      -  "description": "ISO 2-letter country of origin (e.g. \"CN\", \"US\")",
      -  "type": "string"
      -}
    • addedInput schema / properties / origin_country
      Added value: +{
      +  "description": "ISO 2-letter country of origin (e.g. \"CN\", \"US\")",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "commodityCode",
      -  "originCountry",
      -  "customsValue"
      -]New value: +[
      +  "commodity_code",
      +  "origin_country",
      +  "customs_value"
      +]
  8. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.