Skip to main content
Glama

customs_optimization

Reduce duty costs by identifying applicable customs optimization levers such as duty drawback, foreign-trade zones, and bonded warehousing, with quantified savings for your specific shipment parameters.

Instructions

Find the DUTY-SAVING levers a customs broker knows but the importer usually does not — and quantify each against your shipment's REAL landed-cost duty. Give a product (or HS code) + the lane + the FOB value + your trade FLOW (import & sell / re-export / import-components-assemble-re-export / store), and it returns, ranked by saving: DUTY DRAWBACK (US 99% recovery of duties on goods you re-export — honestly flagging that Section 301 is NOT drawback-eligible, the big China carve-out); FOREIGN-TRADE ZONE / FREE ZONE (eliminate duty on the re-exported share, defer it on the rest, inverted-tariff election); BONDED / CUSTOMS WAREHOUSE (defer the duty cash-flow until withdrawal, or avoid it on re-export); EU/UK INWARD PROCESSING (suspend duty on inputs you process & re-export) and OUTWARD PROCESSING (duty only on value added abroad); FIRST-SALE valuation (US — value on the lower factory price, cutting MFN AND 301 proportionally); and TARIFF ENGINEERING (legally reclassify to a lower-duty HS line). Each lever shows the money saved, whether it's cash-back vs cash-flow-deferral vs a rate/base cut, and the catch — plus a clearance-workflow checklist. Reuses the real landed-cost engine so the duty base, 301/232/FTA stack and import VAT are genuine. ⚠️ Aduanas are complex: every figure is MODELED, INDICATIVE planning intelligence, NOT customs/legal/tax advice — confirm eligibility and obtain binding rulings with a licensed broker (regla 7). PREMIUM: pay per call with x402 (USDC on Base) or a prepaid key. Same UN/LOCODE port normalization as get_spot_rate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
origin_portYesOrigin port (city name, UN/LOCODE, or 'City, Country').
dest_portYesDestination port — its country sets the customs bloc & regimes.
container_typeNoContainer '20ft'/'40ft'/'40HC'. Optional; default '40ft'.
productNoProduct description to classify (e.g. 'bluetooth earbuds'). Provide this OR hs_code.
hs_codeNoExplicit HS code (6+ digits). Provide this OR product.
fob_valueYesMerchandise value (FOB) in USD. REQUIRED — it's the duty base.
flowNoThe goods flow: 'import-consume' (sell domestically, default), 'import-reexport', 'import-assemble' (components→assemble→re-export), or 'import-store'. Free text accepted.
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: it states that figures are modeled and indicative, not legal advice, and requires confirmation with a licensed broker. It also notes specific limitations like Section 301 ineligibility for drawback and that the engine reuses the landed-cost calculation.

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 lengthy but well-structured and front-loaded with the purpose. Every sentence adds value, providing detailed information about the levers, outputs, and caveats. However, some redundancy could be trimmed for brevity.

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 (7 parameters, no output schema), the description is fully complete. It explains inputs, outputs (ranked levers with savings and catch), the underlying engine, and important disclaimers, leaving no major gaps for the agent to infer.

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 input schema has 100% coverage with descriptions for all 7 parameters. The description adds significant value by explaining the meaning of each parameter (e.g., flow examples, required fields) and providing context beyond the schema, such as the trade flow options and the requirement for FOB value as duty base.

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 the tool's purpose: finding duty-saving levers for importers. It specifies the exact inputs (product/HS code, lane, FOB value, trade flow) and outputs (ranked savings with details). It distinguishes from sibling tools like 'customs_valuation' and 'get_landed_cost' by focusing on optimization strategies.

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 provides explicit instructions on what to provide (product or HS code, lane, FOB value, trade flow) and what the tool returns. It mentions the context of use (importer seeking duty savings) but does not explicitly state when not to use or compare with alternatives, though it is clear enough.

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

Install Server

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/Baneado98/freight-pulse'

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