Skip to main content
Glama

dnd_strategy

Analyze port congestion and dwell distributions to recommend optimal free days and expected demurrage/detention costs.

Instructions

Optimize the DEMURRAGE & DETENTION free-time strategy for a destination — beyond the simple D&D line: how many FREE DAYS should you negotiate, and what is the EXPECTED D&D cost of accepting fewer, given how long the box will actually DWELL at this (possibly congested) port? It reads the destination port's CONGESTION on your ship date and builds a DWELL DISTRIBUTION (mean + the right tail that a busy port fattens), then for a ladder of candidate free-day grants computes the PROBABILITY of breaching free time (incurring any D&D), the EXPECTED chargeable days, the EXPECTED D&D cost (on the destination region's tiered, escalating per-day schedule — US West-Coast steep, North-Europe gentler) and the p90 bad-case cost. It finds the marginal value of each extra free day and recommends a free-day TARGET — 'in this congested port the dwell tail is fat, so the default 4-5 free days carries $X expected D&D; negotiate 7+'. Demurrage (box sits FULL in the terminal) and detention (box held OUTSIDE past the empty-return grace) are modeled together as combined free time. Pass a carrier to refine the default grant, or your own mean dwell if you know your unpack speed. Modeled from industry-typical regional free days + a congestion-driven dwell distribution — NOT a carrier's filed free-time tariff (regla 7). PREMIUM: pay per call with x402 (USDC on Base) or set a prepaid key (FREIGHT_PULSE_KEY). Same UN/LOCODE port normalization as get_spot_rate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
origin_portYesOrigin port (city, UN/LOCODE, or 'City, Country').
dest_portYesDestination port — its congestion drives the dwell distribution and the regional D&D schedule.
container_typeNoContainer size '20ft'/'40ft'/'40HC' (drives the per-day D&D rate). Optional; defaults to '40ft'.
ship_dateNoIntended ship date (ISO 'YYYY-MM-DD'). The destination congestion (peak windows, disruptions) is evaluated for THIS date. Optional; defaults to today.
carrierNoOptional carrier — refines the default free-day grant (mega lines often grant a touch more).
mean_dwell_daysNoOverride the modeled mean dwell (days) with your own unpack/return speed. Optional.
min_free_daysNoLowest free-day grant to evaluate (default 3).
max_free_daysNoHighest free-day grant to evaluate (default 10 or default+4).
Behavior4/5

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

No annotations provided, so the description carries full burden. It discloses that the tool reads congestion data, builds dwell distributions, and computes probabilistic costs. It does not mention side effects (likely read-only). The methodology is transparent, including modeled assumptions and payment methods.

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 comprehensive but well-structured. It starts with the main purpose, explains methodology, then lists parameters with their roles. It includes necessary caveats and payment info without being verbose. Every sentence adds value.

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?

Despite no output schema, the description thoroughly explains the return values: dwell distribution, probability of breach, expected chargeable days, expected D&D cost, p90 cost, and a recommended free-day target. It covers inputs and outputs completely for this complex tool.

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 baseline is 3. The description adds meaning beyond the schema by explaining how each parameter influences the analysis (e.g., dest_port drives congestion, ship_date sets evaluation date, carrier refines free days). It enriches understanding of parameter relationships.

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 it optimizes demurrage & detention free-time strategy for a destination, using specific verbs like 'optimize' and reference to 'beyond the simple D&D line'. It distinguishes itself from sibling tools like 'booking_strategy' or 'carrier_recommendation' by focusing on free-day negotiation and expected cost modeling.

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 explains when to use (to negotiate free days, evaluate expected D&D costs) and provides context on destination congestion and dwell distribution. It mentions options like passing a carrier or mean dwell. It lacks explicit negative usage guidance but includes a caveat that it's not a carrier's filed tariff.

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