Skip to main content
Glama

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, …

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, non-destructive), the description discloses important behavioral traits: the free-time clock starts at a carrier-defined event, arrival_date is taken as supplied with data_basis='user_supplied_arrival', the response's charge_family field always discloses which charge type answered, and the tool requires payment via x402 returning 402 if unpaid. These contextual details go well beyond annotations and provide no contradiction.

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 information-dense yet well-structured: it opens with the core function, then provides usage guidance, alternative mode, payment requirement, and return fields, all in a logical flow. Every sentence adds value—there is no filler or repetition, and the structure makes the content easy to scan.

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 the exact return fields (free_days_total, days_elapsed, free_days_remaining, etc.), which fully compensates. It also covers edge cases like storage coverage limitations, payment failures (402), and the data_basis and charge_family fields. For a tool with 8 parameters and several nuanced behaviors, the description is comprehensively complete.

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 schema already covers 100% of parameters with descriptions, earning a baseline of 3. The description adds valuable semantics for charge_type—clarifying that 'storage' is a distinct terminal charge, only returned when explicitly requested, with thin coverage and an explicit error listing covered lanes—and explains arrival_date as the clock-starter with user-supplied data basis. This added context justifies a score above baseline, though not every parameter receives additional explanation.

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 ('report') with a clear resource (free-time countdown) and specifies the required inputs (carrier, country, container type, arrival date). It explicitly distinguishes itself from the sibling tool shippingrates_dd_calculate, which answers a fixed number of days, making this the proactive countdown tool.

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?

The description directly states when to use the tool ('Use this to answer "how long until this container starts costing demurrage, and how much per day?"') and contrasts it with shippingrates_dd_calculate, noting they share the same engine so numbers agree. It also provides explicit guidance on using charge_type='storage' for terminal storage, with coverage caveats.

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

All 26 tools have clearly distinct purposes, with detailed descriptions that differentiate overlapping areas (e.g., transit vs. schedule vs. vessel schedule). Even closely related tools like dd_calculate, dd_compare, and dd_countdown are well-delineated.

Naming Consistency5/5

All tool names follow a consistent snake_case pattern with prefix 'shippingrates_'. Compound names use underscores predictably (e.g., dd_calculate, inland_compare, vessel_schedule_options), making the naming scheme highly predictable.

Tool Count4/5

26 tools is slightly above the ideal range, but the breadth of features (rates, D&D, inland, congestion, risk, schedules, etc.) justifies the count. Each tool earns its place, and there is minimal bloat.

Completeness5/5

The tool set covers all major aspects of shipping intelligence: rates, surcharges, local charges, D&D, inland haulage, congestion, risk, transit, schedules, regulatory updates, and discovery tools. No obvious gaps for the stated purpose.

Resources