Skip to main content
Glama

ShippingRates 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.9/5.0
Behavior5/5

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

Despite annotations already declaring readOnly and idempotent, the description adds meaningful behavioral context: the free-time clock starts at a carrier-defined event, arrival_date is taken as user-supplied (data_basis), and non-payment returns 402. It also discloses the charge_family field that distinguishes carrier_dd from terminal_storage.

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 longer than average but every sentence serves a purpose: purpose, usage, data caveat, storage override behavior, payment, and return shape. It is front-loaded with the main query and structured with clear paragraphs, making it easy to skim.

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 no output schema, the description lists all key return fields (free_days_total, days_elapsed, free_days_remaining, etc.), explains failure modes (402 without payment, 'no data' error for uncovered storage lanes), and covers edge cases (charge_family disclosure). It gives an agent everything needed to call the tool correctly.

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%, so the baseline is 3. The description adds real value by explaining that arrival_date starts the free-time clock, charge_type overrides the engine priority and 'storage' is a separate terminal charge with thin coverage, and x_payment is required for paid access. These go beyond the schema's field descriptions.

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 statement of what the tool does: '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.' It also names the sibling tool dd_calculate as the companion for fixed-day questions, clearly distinguishing the countdown use case.

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 says 'Use this to answer "how long until this container starts costing demurrage, and how much per day?"' and contrasts with dd_calculate. It also provides conditional guidance for charge_type='storage' (terminal storage) and notes thin coverage, plus the payment requirement (x402).

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.3/5.0
Disambiguation4/5

Most tools have clearly distinct purposes: D&D calculator/compare/countdown, inland search/haulage/compare, and congestion/news/risk are well separated. However, the transit/vessel group (transit, transit_schedules, vessel_schedule, vessel_schedule_options) and rates vs total_cost could cause some selection ambiguity, though descriptions help differentiate them.

Naming Consistency3/5

All tools share the 'shippingrates_' prefix and snake_case, but naming patterns vary: some are action-oriented (shippingrates_dd_calculate, shippingrates_inland_compare), while others are noun phrases (shippingrates_surcharges, shippingrates_port, shippingrates_total_cost). This inconsistency could make it harder to predict tool names.

Tool Count3/5

With 26 tools, the server is on the heavier side, exceeding the typical 15-tool comfort zone. However, the broad domain of shipping rates, logistics, and regulatory data justifies the number, as each tool covers a distinct aspect. Still, the volume may overwhelm agents.

Completeness5/5

The tool set is remarkably comprehensive for a shipping rates server, covering freight benchmarks, surcharges, local charges, D&D (calculate/compare/countdown), inland haulage, transit schedules, vessel schedules, congestion, risk scoring, regulatory updates, facilities, FX, and a composite total-cost calculator. No obvious gaps for common logistics cost-analysis workflows.