Package builder module — JetSetGo MCP reference
The packages module builds packages: single products a customer buys once that are really several separately-bookable products underneath — a transfer out, a crossing, a guided activity, accommodation nights, the return leg — quoted as one price, booked as one reservation. The module exposes the recipe behind each package: its sections (each one customer question), the choices within them, the bookable products attached to those choices, timing rules, pathways, versions, and publishing.
What the operator uses it for
Operators author recipes an itinerary sells from. Each step of the journey is a section — exactly one question the customer is asked ("getting there", "where are you staying?"). The answers are choices, and each choice carries the component products that actually book. One section is the anchor: the customer picks its date, and every other section derives its date from it.
Assistant work spans building out sections/choices/products, pinning fare classes, writing auto-pick rules and timing constraints, configuring pathways, checking for blocking problems (packages_validate writes nothing and can run freely after every change), then publishing or unpublishing. Every write is preview-then-confirm.
Where it sits
Packaging sits at the top of the catalogue and composes what other modules own — no pricing, availability, or capacity logic of its own. Upstream it points at resources (including the package-flagged product it is sold as), behaviours, fare items and their sub-types, stops/routes, custom fields, cancellation policies. Downstream, search pivots on the anchor's date; availability resolves each section's choices; pricing either sums the chosen parts (emergent) or uses the package product's own price with derived shares (target); bookings become a reservation tree pinned by the exact version sold. The selling product is an ordinary resource flagged as a package, created in Resources, never here; one live package per such product.
Key concepts
- Section (tool arguments say node) — one step = one question the customer answers.
- Choice (option) — one answer to a section's question; has no product of its own.
- Component product (option resource) — what actually books when a choice is picked; first attached books, later ones are fallbacks.
- Display product (face) — picture/copy on a section's card; books nothing except on the anchor, which books off its own product directly.
- Anchor — the timing root; exactly one per package; never another package or an accommodation product.
- Decline card (skip option) — an ordinary choice flagged as the section's "no thanks"; books nothing.
- Pathway — a pre-baked personality through the package, offered in selected sales channels; can pin answers or mute questions.
- Version — snapshot appended on every save/publish/unpublish; latest number is the write concurrency token.
All tools take an explicit tenant. Writes are two-phase: call without confirm to preview, then re-call with confirm: true plus the returned previewToken.
Reading and validating
| Tool |
Class |
Purpose |
packages_list · packages_get · packages_get_by_resource |
Read |
List packages (overview); fetch one full configuration; resolve the package behind a given selling product. |
packages_validate |
Read |
Full rule sweep naming what blocks sale vs advisory. Writes nothing; safe to run repeatedly. |
packages_get_pathways · packages_list_contexts |
Read |
Pathways with channels, defaults, pins, overrides; available sales channels. |
packages_get_current_version · packages_list_versions · packages_get_version · packages_list_pathway_versions |
Read |
Concurrency token; version history with authors and booking counts; one full snapshot; pathway history. |
packages_list_backing_resources · packages_list_service_resources · packages_list_option_resources |
Read |
Products usable as backing/display/bookable, with package, route, and accommodation flags. |
packages_list_question_styles |
Read |
Question styles a section may use. |
packages_list_resource_pudo · packages_list_profile_custom_fields |
Read |
Advisory pick-up/drop-off stops on component products; extra answers each fare-item sub-type requires in a publishable party profile. |
Template basics and day editorial
| Tool |
Class |
Purpose |
packages_template_create |
Guarded write |
Start an empty draft on a package-flagged product; binding permanent. |
packages_template_update |
Guarded write |
Change name, description, duration, pricing strategy. |
packages_template_set_screen_copy / packages_template_set_search_profile |
Guarded write |
Set booking-screen headings (null restores defaults); set the assumed default party — the "from" price basis, required before publishing. |
packages_day_set / packages_day_clear / packages_days_remove_orphans |
Guarded write / destructive |
Write or clear one day's editorial copy; clear leftovers beyond a shortened duration. |
Sections
| Tool |
Class |
Purpose |
packages_node_add / packages_node_update / packages_node_reorder |
Guarded write |
Add a section (empty until choices carry products); edit placement, style, copy, display product, anchor flag, stay window, capacity flag; visual reorder only. |
packages_node_set_pudo |
Guarded write |
Set default pick-up/drop-off: fixed stop, derived from another section, or both. |
packages_node_remove |
Guarded write (destructive) |
Remove a section with everything attached; refused if pathway-pinned. |
Choices and their bookable products
| Tool |
Class |
Purpose |
packages_option_add / packages_option_update / packages_option_remove |
Guarded write / destructive |
Add a choice; edit label/description/badge/caution/decline flag; remove choice with its products. |
packages_option_reorder |
Guarded write |
Move a choice within its section's display order. |
packages_option_resource_add / packages_option_resource_remove / packages_option_resource_reorder |
Guarded write / destructive |
Attach, detach, or resequence a choice's bookable products (first books, rest fallbacks). |
packages_option_set_variation |
Guarded write |
Pin or clear the fare class a choice always books. |
packages_option_set_service_filter |
Guarded write |
Narrow which departures a choice offers (time/stop conditions). |
Defaults and timing
| Tool |
Class |
Purpose |
packages_default_rule_add / packages_default_rule_update / packages_default_rules_reorder / packages_default_rule_remove |
Guarded write / destructive |
Maintain a section's filter-then-rank auto-pick pipeline; removal may shift the lead choice and "from" price. |
packages_constraint_add / packages_constraint_update / packages_constraint_remove |
Guarded write / destructive |
Maintain timing rules between sections or clock times, with comfort bands. |
Pathways
| Tool |
Class |
Purpose |
packages_pathway_create / packages_pathway_update |
Guarded write |
Create a pathway with channels; rename/re-describe without touching pins or overrides. |
packages_pathway_set_active |
Guarded write (destructive when switching off) |
Retire or restore a pathway — switching off is deletion; the last active one can't be turned off. |
packages_pathway_set_contexts / packages_pathway_set_default_for_context |
Guarded write |
Replace channel list; move a channel's default onto this pathway. |
packages_pathway_set_node_setting |
Guarded write |
Pin an answer and/or mute the question on one section for this pathway. |
packages_pathway_set_node_rules |
Guarded write |
Replace this pathway's pipeline for one section; empty list removes the override. |
Going live
| Tool |
Class |
Purpose |
packages_publish |
Guarded write |
Put the package on sale after a blocking-check sweep; writes a version. |
packages_unpublish |
Guarded write (destructive) |
Take off sale; configuration untouched, republish restores. |
packages_duplicate |
Guarded write |
Copy onto another unbound package-flagged product as a draft; per-pathway overrides are not copied — the preview says how many are lost. |
packages_delete |
Guarded write (destructive) |
Soft-delete, no self-service undelete; frees the backing product. Allowed while on sale, with warning. |
Rules worth knowing
- Face versus booking. A section's display product supplies picture and copy only — no service, capacity, price, or reservation. What books is the products on the section's choices; every read states this per section as
books_from: anchor_face, options, or nothing.
- Anchor rules. Exactly one; never a package product or an accommodation product (decided by behaviour, not naming); books off its own product directly. A sub-package — a choice pointing at another package — resolves its own anchor first within its own scope.
- Fixed sections don't book today. A bookable product attached directly to a non-anchor fixed section renders but books nothing; the sanctioned shape is a choice-section carrying one non-decline choice.
- Saves rewrite child ids. Every write loads the tree, changes one thing, saves it whole; section/choice ids churn each save — re-read, never cache across writes. A stale version token means someone else changed the package; nothing was written. Pathways version independently.
- Removal cascades quietly elsewhere. Removing a section also destroys every pathway's tuned override for it — the preview counts and names affected pathways (warning, not refusal). Removing a choice leaves overrides aimed at it alive but targetless.
- Degradation is labelled, never guessed. Untracked joins fall back rather than fail: accommodation returns null (unknown), never false; unreadable pick-up/capacity columns return
unknown: true. Never report "no party-size limit" unless capacity is known rather than placeholder.
- Import is deliberately not exposed — it would pass large snapshot JSON through the model verbatim under whole-tree save semantics, the likeliest silent-corruption path; point operators at the builder's own Import. Duplication IS exposed: no snapshot crosses the model.
- Publish/unpublish/delete are distinct. Unpublish is reversible; delete releases the backing product and needs an administrator to reverse. Both publish and unpublish write a version.
- Resources — owns the package-flagged selling product and every component product; this module never mints either.
- Channels — the sales-channel contexts deciding which pathways customers see.
- Bookings — consumes published packages as reservation trees pinned to the exact version sold.