Skip to main content
Glama

Calculate tariff scenario

calculate_tariff_scenario
Read-only

Calculate US import duties for a shipment by stacking HTS base rates, active Chapter 99 additional tariffs, and MPF/HMF fees from origin and value inputs to estimate total landed cost.

Instructions

Returns the HTS code's MFN/FTA base rate, ALL active chapter 99 rules (IEEPA/301/232 additional duties) matching the origin as verbatim text, and MPF/HMF fees. The LLM should walk the chapter-99 exception chains itself to stack the right duty layers, explain each step to the user, and always note this is an estimate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hts_codeYes8-10 digit HTS code, with or without dots
quantityNoQuantity in the code's units (No./Dz Pcs...) — needed for per-piece specific duties
weight_kgNoTotal weight (kg) — REQUIRED when the code carries a specific duty per kg (e.g. '12.4¢/kg')
ocean_freightNoOcean shipment? (applies HMF)
origin_countryYesCountry of origin (English name, e.g. 'China', 'Vietnam', 'Mexico')
customs_value_usdYesCustoms value of the shipment (USD)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.0.2
    • changedInput schema / properties / customs_value_usd / description
      Previous value: -"Trị giá hải quan lô hàng (USD)"New value: +"Customs value of the shipment (USD)"
    • changedInput schema / properties / hts_code / description
      Previous value: -"Mã HTS 8-10 số, có chấm hay không đều được"New value: +"8-10 digit HTS code, with or without dots"
    • changedInput schema / properties / ocean_freight / description
      Previous value: -"Hàng đi đường biển? (áp HMF)"New value: +"Ocean shipment? (applies HMF)"
    • changedInput schema / properties / origin_country / description
      Previous value: -"Nước xuất xứ (tên tiếng Anh, vd 'China', 'Vietnam', 'Mexico')"New value: +"Country of origin (English name, e.g. 'China', 'Vietnam', 'Mexico')"
    • changedInput schema / properties / quantity / description
      Previous value: -"Số lượng theo đơn vị của mã (No./Dz Pcs...) — cần cho thuế đặc thù theo chiếc"New value: +"Quantity in the code's units (No./Dz Pcs...) — needed for per-piece specific duties"
    • changedInput schema / properties / weight_kg / description
      Previous value: -"Tổng trọng lượng (kg) — BẮT BUỘC nếu mã có thuế đặc thù theo kg (vd '12.4¢/kg')"New value: +"Total weight (kg) — REQUIRED when the code carries a specific duty per kg (e.g. '12.4¢/kg')"
  2. First observedv1.0.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true. The description adds important behavior beyond that: it returns chapter-99 rule text verbatim rather than a final computed rate, instructs the LLM to walk exception chains itself, and requires the output to be labeled as an estimate. This is useful and non-obvious behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact: the first sentence enumerates return values, and the second captures the agent workflow and estimate caveat. Every sentence adds meaningful guidance without filler.

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?

There is no output schema, but the description explains the output categories and tells the LLM how to use and present the results. It does not specify an exact response shape, but that is not essential for correct invocation given the parameter schema.

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 the schema already documents all six parameters adequately. The description adds no parameter-level detail beyond mentioning origin and HTS code, which keeps this at the baseline score.

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 uses a specific verb ('Returns') and names concrete outputs: MFN/FTA base rate, active chapter 99 rules, and MPF/HMF fees. This clearly distinguishes the tool from sibling tools like search_hs_candidates, watch_tariff_changes, and check_tariff_updates.

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?

The description gives clear context that the tool is for computing a tariff scenario from an HTS code and origin, and includes explicit procedural guidance for the LLM. It does not explicitly say when NOT to use it or name alternatives, so it misses the highest bar.

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