Skip to main content
Glama
SoapyRED

FreightUtils MCP Server

uk_duty_calculator

Read-onlyIdempotent

Estimate UK import duty and VAT for a commodity code using live GOV.UK Trade Tariff rates. Get duty, VAT, and total landed cost from customs value, origin country, and optional freight/insurance.

Instructions

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 (6-10 digits), 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; an unknown or non-declarable commodity code errors with HMRC's message (a 6-digit code may need extending to its 8/10-digit declarable line); origin-dependent measures the tariff cannot resolve automatically surface in warnings. Rate-limited (anonymous use: 25 requests/day per IP): a 429 error body carries retry_after_seconds and a Retry-After header — back off and retry, or call get_subscribe_link for higher limits.

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; validity.as_of marks the live-rate timestamp; plus confidence, _source and citation (the FreightUtils v1 response envelope).

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
incotermNoIncoterms 2020 basis of the customs_value — documents which costs are already included.
freight_costNoFreight cost in GBP — added to the CIF value. Default: 0.
customs_valueYesGoods value in GBP. Example: 1000.
commodity_codeYesHS/UK tariff code, 6-10 digits. Example: "8471300000" (portable computers). 6-digit codes may need the declarable 8/10-digit line.
insurance_costNoInsurance cost in GBP — added to the CIF value. Default: 0.
origin_countryYesISO 2-letter country of origin. Examples: "CN", "DE", "US".

Output Schema

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

TDQS

A4.6/5.0
Behavior5/5

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

The description adds a substantial amount beyond the annotations: rates are fetched live per request, unknown or non-declarable codes error with HMRC's message, origin-dependent measures surface as warnings, and there is a rate limit with 429 handling and a retry_after_seconds field. This is exactly the behavioral detail an agent needs and uses.

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 longer than typical but every section serves a purpose: behavior, returns, limitations, related tools. The core purpose and formula are front-loaded, and optional details are clearly segmented. Some return-field details could be left to the output schema, but nothing feels wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity, the rich output schema, 6 parameters, external dependency (live GOV.UK Tariff), rate limits, and related workflows, the description is complete. It covers error behavior, retry logic, return fields, limitations, and alternative/related tools. An agent can predict the tool's behavior and side effects without further documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already covers all 6 parameters with detailed descriptions and examples, so the baseline is met. The description adds extra meaning by defining the CIF calculation, stating optional parameters default to 0, and noting that commodity_code may need extension from 6 to 8/10 digits. It doesn't fully expand on incoterm semantics, but the schema covers that.

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 opens with a specific verb and resource: 'Estimate UK import duty and VAT for a commodity code using the LIVE GOV.UK Trade Tariff'. It goes on to explain the calculation formula and clearly separates this tool from siblings like hs_code_lookup and incoterms_lookup, so an agent can tell which tool to invoke.

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?

It explicitly identifies required versus optional inputs and provides related-tool guidance such as 'hs_code_lookup (find the 6-digit code first)' and 'incoterms_lookup (who actually pays these costs)'. It does not spell out exact 'use this instead of' conditions, but the context makes the intended usage clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SoapyRED/freightutils-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server