Skip to main content
Glama

freightgate-mcp-server

Demurrage/Detention Free-Time Countdown

shippingrates_dd_countdown
Read-onlyIdempotent

Given a container's carrier, country, container type and ARRIVAL DATE, report how many free days remain, the first chargeable day, the per-diem once charging starts, cost accrued so far, and a forward cost projection.

Use this to answer "how long until this container starts costing demurrage, and how much per day?" — the proactive companion to shippingrates_dd_calculate (which answers a fixed number of days). Same underlying tariff engine, so the numbers agree.

The free-time clock starts at the carrier-defined event (port discharge or ICD rail arrival) — the arrival_date is taken as supplied, not carrier-confirmed (data_basis = user_supplied_arrival).

Pass charge_type="storage" for a TERMINAL storage countdown instead of carrier D&D (thin coverage — see charge_type param). The response's charge_family field ('carrier_dd' | 'terminal_storage') always discloses which one answered the request.

PAID: $0.10/call via x402 (USDC on Base or Solana). Without payment, returns 402 with payment instructions.

Returns: { free_days_total, days_elapsed, free_days_remaining, free_time_ends_on, status, accrued_cost, current_daily_rate, currency, forecast[] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lineYesShipping line slug — maersk, msc, cmacgm (or cma-cgm), hapag-lloyd, one, cosco, zim, evergreen, yangming, hmm, arkas, oocl, pil
portNoOptional UN/LOCODE to pin a port-specific tariff (some lanes price ports differently, e.g. north vs south China)
countryYesISO 2-letter country code (e.g. IN, AE, SG)
directionNoimport or export (default import)
x_paymentNox402 payment proof header (optional — required for paid access)
charge_typeNoOverride the charge type; default is the engine's detention→demurrage→combined priority. 'storage' is a distinct TERMINAL charge (not carrier D&D) and is ONLY ever returned when explicitly requested here. Coverage is thin; an uncovered lane returns an explicit 'no data' error listing the currently-covered lanes.
arrival_dateYesContainer arrival date, YYYY-MM-DD — starts the free-time clock
container_typeYesISO 6346 container type — 20GP, 40GP, 40HC, 20RF, …

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • changedInput schema / properties / line / enum
      Previous value: -[
      -  "maersk",
      -  "msc",
      -  "cmacgm",
      -  "cma-cgm",
      -  "hapag-lloyd",
      -  "one",
      -  "cosco",
      -  "zim",
      -  "evergreen",
      -  "yangming",
      -  "hmm",
      -  "arkas",
      -  "oocl",
      -  "pil"
      -]New value: +[
      +  "maersk",
      +  "msc",
      +  "cmacgm",
      +  "cma-cgm",
      +  "hapag-lloyd",
      +  "one",
      +  "cosco",
      +  "zim",
      +  "evergreen",
      +  "yangming",
      +  "hmm",
      +  "arkas",
      +  "oocl",
      +  "pil",
      +  "wanhai"
      +]
  2. Changed2 schema fields changed
    • changedInput schema / properties / charge_type / description
      Previous value: -"Override the charge type; default is the engine's detention→demurrage→combined priority"New value: +"Override the charge type; default is the engine's detention→demurrage→combined priority. 'storage' is a distinct TERMINAL charge (not carrier D&D) and is ONLY ever returned when explicitly requested here. Coverage is thin; an uncovered lane returns an explicit 'no data' error listing the currently-covered lanes."
    • changedInput schema / properties / charge_type / enum
      Previous value: -[
      -  "detention",
      -  "demurrage",
      -  "combined"
      -]New value: +[
      +  "detention",
      +  "demurrage",
      +  "combined",
      +  "storage"
      +]
  3. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses that arrival_date is user-supplied and not carrier-confirmed (data_basis=user_supplied_arrival), a critical accuracy caveat. It also discloses the paid access requirement ($0.10/call, 402 without payment), the storage charge_type special case with thin coverage, and the charge_family response disambiguation.

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 comprehensive but well-structured: it front-loads the core purpose, then addresses use case, caveats, payment, and return fields in logical order. While slightly long, every sentence adds substantive information.

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?

With 8 parameters and no output schema, the description compensates by explicitly listing the return fields, covering the payment flow, and noting coverage limitations. The contrast with dd_calculate and the data_basis caveat make it complete for an agent to invoke confidently.

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?

Schema coverage is 100% with per-parameter descriptions, setting a baseline of 3. The description adds value by explaining the arrival_date clock semantics, the x_payment requirement tie-in, and the charge_type override behavior, pushing it to a 4.

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 precise verb and resource: given container details, it reports free days remaining, first chargeable day, per-diem, and cost projection. It explicitly contrasts with shippingrates_dd_calculate, which answers a fixed number of days, making the tool's niche unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states 'Use this to answer how long until this container starts costing demurrage, and how much per day?' and names shippingrates_dd_calculate as the alternative for fixed-day calculations, with a note that they share the same tariff engine. This gives clear when-to-use and when-not-to-use context.

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.

TDQS

A4.6/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with detailed descriptions that prevent confusion. For example, shippingrates_dd_calculate vs shippingrates_dd_compare handle single-carrier vs cross-carrier D&D analysis, and shippingrates_congestion, congestion_news, and risk_score cover different aspects of port conditions and route risk.

Naming Consistency5/5

All tools follow a consistent 'shippingrates_<specific_name>' pattern using snake_case. The suffixes are descriptive and predictable (e.g., _calculate, _compare, _search, _schedule), making it easy for agents to infer functionality from names.

Tool Count4/5

With 25 tools, the set is comprehensive but slightly on the higher side. However, each tool serves a distinct function within the shipping intelligence domain, and no tool feels redundant. The count is appropriate for the broad scope of the server.

Completeness5/5

The tool surface covers the full spectrum of shipping logistics: freight rates, surcharges, local charges, demurrage/detention, inland haulage, transit schedules, vessel schedules, port/facility info, congestion, disruption news, risk scoring, regulatory updates, currency conversion, and discovery tools (search, stats). No obvious gaps for the stated purpose.

Resources