plan_passage
Plan an A→B passage. Compare departure windows by default; pin a
single departure only when the user gives an explicit time.
## Tool routing: read this first
Before calling, classify the user's question:
1. **Pure weather lookup at a point** ("y aura-t-il du vent à Cassis
samedi à 14h ?", "quelles vagues dimanche au cap Sicié ?"): call
``get_marine_forecast``. Do NOT call
``plan_passage``: there's no route to plan.
2. **Trajet question with a flexible date** ("Marseille → Porquerolles
ce week-end", "demain ou après-demain", "dans les prochains jours"):
call ``plan_passage`` in **compare-windows mode**, passing
``latest_departure`` (e.g. earliest+48h) and ``sweep_interval_hours``
(3 or 6 typically) so the user sees several departure scenarios
side-by-side.
This is the **default** for trajet planning: same API cost as a
single passage thanks to cache prewarm, much more value.
3. **Trajet with a precise hour pinned by the user** ("je pars demain
à 8h", "départ Saturday 9am"): call ``plan_passage`` in single
mode (no ``latest_departure``). Used for the final "show me the
detailed plan for THIS departure" view, often after step 2.
4. **Two ways to go** ("nord ou sud du Fromveur pour Ouessant ?",
"par l'intérieur ou l'extérieur des Glénan ?", "Ré ou Aix
demain ?"): one ``plan_passage`` call, the first route in
``waypoints`` and the others in ``alternatives`` (two at most),
each with a short ``label`` saying how it goes ("Par le nord du
Fromveur"). Every route is computed for the same departures, so
the widget compares them cell by cell. Do not make one call per
route.
5. **When to be at a pass** ("à quelle heure au Raz de Sein ?",
"quand renverse le courant au Fromveur ?"): ``get_tidal_stream``
at the pass, with the course you will steer, and ``plan_passage``
comparing departures, both in the same turn; then pick the
departure that brings you there in the favourable window.
6. **Methodology question** ("comment c'est calculé ?",
"quelle efficacité par défaut ?"): call ``read_me``.
Rule of thumb: if the user does NOT give an exact hour, prefer
compare-windows. The widget renders one of the windows by default
and the chat lets the user pick another.
## Waypoints must stay in the water
This server runs a coarse land check before anything else: a leg
that runs a couple of kilometres over land, or a waypoint inland, gets
the call refused before any forecast request, with the leg and the
place named. Redraw it and call again: a route over land is not one
the boat can sail. The shoreline is coarse (about 1 km, the coast widened by
2 km so harbours stay at sea, and any water a fine current atlas
resolves counts as sea): a spit narrower than about 4 km, or a
leg that shaves a headland, passes the check and is timed as drawn,
too short, too fast, and scored on conditions the boat would never
meet.
So the route is still yours to draw. Between every consecutive pair of
waypoints the straight line must stay at sea. Add intermediate
waypoints to round anything the direct line would cut: headlands,
peninsulas, islands, shoals.
- Toulon to Saint-Tropez: the direct line crosses the Massif des
Maures. Pass south of the presqu'île de Giens, then round cap Bénat
and cap Camarat before turning north into the gulf.
- Brest to Douarnenez: the direct line crosses the presqu'île de
Crozon. Exit the goulet, round the cap de la Chèvre, then head east
into the bay.
Keep about 1 NM of clearance off headlands, more with onshore wind or
swell, and do not shave the inside of islands. Extra waypoints are
close to free: the cap is 50, and sampling cost follows
``segment_length_nm`` and total distance, not the waypoint count. When
in doubt, add the waypoint.
A waypoint that lands ashore has a second effect. Open-Meteo returns
no sea state over land, so those samples carry a null wave height and
the complexity score silently falls back to wind only, dropping the
axis that would have flagged a rough passage.
## Returned payload
Every time comes back in the UTC offset of ``departure``: send the
user's own (``+02:00`` for France in summer) and read the times as
their clock.
Single mode:
- ``passage``: per-segment timing report (distance_nm, duration_h,
model used, segments[] with TWS/TWA/boat_speed/Hs and the sea
state decided per segment, ``sea_level`` and ``sea_flag``, warnings).
- ``complexity``: 1-5 difficulty score with wind/sea breakdown and a
human-readable rationale.
- ``openwind_url``: deep-link to ohmywind.fr/plan that renders the
same passage in the standalone web app.
- ``waypoints``: the route as you sent it, which the widget draws on
a map.
- ``route_label`` and ``alternatives[]``, only when you passed
alternatives: each alternative has its ``label``, ``waypoints``,
``passage``, ``complexity`` and ``openwind_url``.
- ``disclaimer``: usage warning intended for the user
(decision-support tool, not a navigation instrument).
Compare-windows mode (``latest_departure`` set):
- ``mode``: ``"multi_window"``.
- ``sweep``: ``earliest`` / ``latest`` / ``interval_hours`` /
``window_count``.
- ``windows[]``: each entry has ``departure``, its ``weekday``,
``arrival``, ``duration_h``, ``distance_nm``, ``complexity`` (level
+ label + rationale), ``conditions_summary`` (tws_min/max,
predominant sail angle, hs_min/max), ``warnings`` (the difficulty
first), ``openwind_url``.
- ``meta_warnings``: notes about the whole sweep or the route ("3
fenêtres ignorées …", a long route sampled more sparsely).
- ``waypoints``: the route as you sent it, once for all windows.
- ``route_label`` and ``alternatives[]``, only when you passed
alternatives: each alternative has its ``label``, ``waypoints``
and its own ``windows[]``, same departures.
- ``disclaimer``: usage warning intended for the user
(decision-support tool, not a navigation instrument).
``openwind_url`` opens this plan in the web app, where the route,
departure and boat can be edited and the plan shared. It points at
the environment this server is configured for, so it is the one to
use rather than a URL composed by hand.
## How it renders
On hosts that support MCP Apps (Claude, Claude Desktop, ChatGPT, VS
Code Copilot, Goose, Postman, MCPJam), the response is automatically
accompanied by an interactive widget served via the
``ui://openwind/plan-passage`` resource declared on this tool's
``_meta``. In compare-windows mode it lists the departures; the one
the user selects (the earliest at first) drives a map of the route
you drew, coloured by its wind, and its per-leg detail. In single
mode it shows the figures, the map and the per-leg detail. The user
sees your waypoints on that map, one more reason to keep every leg at
sea.
On hosts without MCP Apps support (Cursor, Le Chat, terminal), no
widget renders; the payload and ``openwind_url`` carry the plan.
## Args
waypoints: list of ``{"lat": ..., "lon": ...}`` dicts, 2 to 50.
Used ex
Schema valid · SHA-256 fdfb947c8827…
View input schema
{
"type": "object",
"properties": {
"waypoints": {
"items": {
"additionalProperties": {
"type": "number"
},
"type": "object"
},
"title": "Waypoints",
"type": "array"
},
"departure": {
"title": "Departure",
"type": "string"
},
"archetype": {
"title": "Archetype",
"type": "string"
},
"efficiency": {
"default": 0.75,
"title": "Efficiency",
"type": "number"
},
"segment_length_nm": {
"default": 10,
"title": "Segment Length Nm",
"type": "number"
},
"model": {
"default": "auto",
"title": "Model",
"type": "string"
},
"max_hs_m": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Max Hs M"
},
"latest_departure": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Latest Departure"
},
"sweep_interval_hours": {
"default": 1,
"title": "Sweep Interval Hours",
"type": "integer"
},
"target_eta": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Target Eta"
},
"motor_threshold_kn": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Motor Threshold Kn"
},
"motor_speed_kn": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Motor Speed Kn"
},
"min_upwind_twa_deg": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Min Upwind Twa Deg"
},
"route_label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Route Label"
},
"alternatives": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Alternatives"
},
"inland_waterway": {
"default": false,
"title": "Inland Waterway",
"type": "boolean"
}
},
"required": [
"waypoints",
"departure",
"archetype"
],
"title": "plan_passageArguments"
}