Skip to main content
Glama

simulate_scenario

Run a what-if scenario on a freight lane to see cost and time impacts from market changes like route diversions, fuel spikes, or tariff adjustments, with transparent baseline and delta comparisons.

Instructions

Run a WHAT-IF on a lane: recompute the COST and TIME impact of a structural change to the freight market, on top of freight-pulse's engines. Scenarios: 'red-sea-reopen' (Suez/Bab-el-Mandeb reopens and Asia-Europe / the Suez share of Asia-US-East services return from the Cape-of-Good-Hope diversion → shorter transit, war-risk & diversion surcharges fall — only material on Suez-exposed lanes); 'fuel-spike' (bunker VLSFO up X% → the BAF/bunker portion of the all-in rises; pass fuel_spike_pct); 'cny' (Chinese New Year front-loading: the pre-CNY rush spikes the spot rate and the equipment crunch and dips schedule reliability — material on China-origin lanes); 'tariff-change' (destination duty changes by X percentage points — e.g. a new Section-301 tranche or an FTA change — raising/lowering the landed cost while freight is UNCHANGED; pass tariff_delta_pp and value). It recomputes the affected engine outputs under the perturbed inputs it can thread (fuel proxy, ship date) and models the structural ones (the Red-Sea routing flag, a tariff delta) as explicit, transparent adjustments — never silently — and reports the baseline, the scenario and the deltas. A what-if is a MODELED counterfactual, not a prediction the event will occur (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 (city, UN/LOCODE, or 'City, Country').
scenarioYesThe what-if: 'red-sea-reopen', 'fuel-spike', 'cny' or 'tariff-change'. REQUIRED.
container_typeNoContainer size '20ft'/'40ft'/'40HC'. Optional; defaults to '40ft'.
ship_dateNoIntended ship date (ISO). Drives the CNY-year and the baseline all-in. Optional; defaults to today.
fuel_spike_pctNoFor 'fuel-spike': percent increase in VLSFO bunker (e.g. 30 = +30%). Default 30.
tariff_delta_ppNoFor 'tariff-change': change in duty in PERCENTAGE POINTS (e.g. 10 = +10pp, -5 = a cut). Default 10.
valueNoFor 'tariff-change': merchandise value (USD) to size the duty/landed impact. Default 50000.
Behavior5/5

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

With no annotations provided, the description fully carries the burden. It discloses that the tool never silently adjusts, reports baseline/scenario/deltas, and requires payment via x402 or prepaid key. It also mentions port normalization and the structural adjustments are transparent.

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 dense but well-structured, front-loading the main purpose and scenarios. It could be slightly more concise (e.g., 'regla 7' might be obscure to some agents), but overall it efficiently uses space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 8 parameters and no output schema, the description adequately explains inputs and their effects. It mentions deltas and baseline but does not detail the exact output structure (e.g., format of returned data). Slightly more detail on return values would improve completeness.

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 description coverage is 100%, so baseline is 3. The description adds significant value by explaining scenarios and their effects (e.g., 'fuel-spike: bunker VLSFO up X% → BAF/bunker portion rises') and details the purpose of parameters like fuel_spike_pct, tariff_delta_pp, and value beyond the schema.

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 runs a 'what-if' on a lane, recomputing COST and TIME impact of structural changes. It lists specific scenarios (red-sea-reopen, fuel-spike, cny, tariff-change) and distinguishes itself from siblings by focusing on counterfactual simulations, not predictions.

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 scenarios and when to use each (e.g., 'only material on Suez-exposed lanes', 'material on China-origin lanes'). It also clarifies it is a modeled counterfactual, not a prediction. However, it does not explicitly mention when NOT to use this tool or list alternatives among the 48 sibling tools.

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