Skip to main content
Glama

Estimate import duties, fees and customs time

estimate_duties
Read-onlyIdempotent

Planning estimate of import duty, entry fees and typical customs clearance time for a shipment crossing a border. For U.S. imports it looks the goods up in the official Harmonized Tariff Schedule by HS/HTS code or product words and returns matching tariff lines with their general duty rate, plus the Merchandise Processing Fee and (ocean only) the Harbor Maintenance Fee. For other destinations it returns only a country-wide average tariff. It does NOT calculate origin-dependent extra U.S. tariffs (Section 232, Section 301, country-specific tariffs) or import VAT/GST, and it is not customs advice or a classification ruling: always pass the disclaimer and notes on to the user. If several tariff lines come back, ask the user which describes their goods, then call again with that line's code.

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": {
      "dest_country": "<dest_country>",
      "origin_country": "<origin_country>",
      "cargo_value_usd": "<cargo_value_usd>",
      "mode": "<mode>",
      "hs_code": "<hs_code>",
      "product": "<product>"
    },
    "name": "estimate_duties"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesHow the goods arrive; the U.S. harbor fee applies to ocean only. Null defaults to ocean.
hs_codeYesU.S. imports: HS or HTS code, at least 4 digits, e.g. '6109.10.00'. Null when unknown.
productYesU.S. imports, when no code is known: a few plain product words, e.g. 'cotton t-shirts'. Null otherwise.
dest_countryYesDestination country, ISO 3166-1 alpha-2 code. Example: 'US'.
origin_countryYesOrigin country, ISO alpha-2 code, or null if unknown. Example: 'CN'.
cargo_value_usdYesCustoms value of the goods in U.S. dollars, or null to get rates without amounts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the readOnly/idempotent/openWorld annotations: it names the data source (official Harmonized Tariff Schedule), the returned components (tariff line general rate, Merchandise Processing Fee, ocean-only Harbor Maintenance Fee), and the calculation limits. It also discloses the multi-call loop and the obligation to pass disclaimers and notes to the user, which is exactly the non-obvious operational context an agent needs.

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?

Four dense sentences with the core purpose front-loaded and zero filler; exclusions and the follow-up loop are properly sequenced after the definition. The tariff-lookup sentence is a long run-on that could be split, which is the only structural blemish.

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?

There is no output schema, so the description must carry the return shape, and it does: matching tariff lines with general duty rates plus MPF and HMF for U.S., country-wide average elsewhere. Combined with the documented exclusions and the multi-line disambiguation step, an agent has everything needed to call this correctly and interpret the result.

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 coverage is 100%, so all six parameters are already documented, including the hs_code/product fallback and the ocean default for mode. The description adds only light reinforcement of parameter-to-behavior links (product words as a substitute when no code is known, country-wide average when dest_country is not US), which justifies the baseline rather than more.

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?

States a specific verb and resource (planning estimate of import duty, entry fees, typical customs clearance time) and immediately scopes it by destination: U.S. imports get an HTS lookup, other destinations get a country-wide average. That scope split also differentiates it from the freight-rate siblings, which price transport rather than border charges.

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 clear context (planning estimates, U.S. vs non-U.S. behavior) and explicit exclusions (no Section 232/301/origin tariffs, no VAT/GST, not customs advice or a classification ruling), plus a concrete follow-up protocol when multiple tariff lines return. It stops short of naming a sibling alternative, but no sibling appears to overlap this border-cost function.

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