MCP Module Reference

General ledger rules module — JetSetGo MCP reference

The glrules module manages how JetSetGo allocates revenue, commission and cancellation-fee amounts to general-ledger (GL) accounts when bookings are processed. It maintains the chart of accounts, dated per-type allocation rule sets, budgets, and accounting operations: batch catch-ups, invoice batches, export/status tracking.

What the operator uses it for

Operators define posting policy as rule sets: each set covers one entry type — revenue, commission or cancellation fee — within a date range over a chart of accounts of named, uniquely externally identified accounts. Its rules map a booking characteristic to an account along an escalating priority ladder ending in a catch-all default. Operators also record monthly budgets, designate the GL account absorbing payment surcharges, and run batch catch-ups, invoice-batch preview/execution, exports and marker corrections.

Where it sits

Upstream, rule targets come from resources, product types and product sub-types; bookings supply transactions; clients supply agents for commission allocations. Downstream, generated entries and exports feed external accounting/GL systems and reporting reads. The settings store is shared with settings, its canonical owner; only the payment-surcharge slice surfaces here.

Key concepts

  • GL account — chart-of-accounts line; allocation target; soft-retired rather than deleted.
  • Rule set — dated window scoped to one entry type; two sets of one type never share a day.
  • Allocation rule — maps a target (resource, product sub-type or product type) to an account in a set, resolved along an escalating ladder ending in a default rule.
  • Budget — monthly amount per account for a year/month pair.
  • Batch run / invoice batch — records from processing sales/payment batches, and invoice groupings created together from due bookings. Both carry export markers.

Tools

Tool Class Purpose
glrules_accounts_list Read Active GL accounts.
glrules_account_get Read One account by id.
glrules_rule_sets_list Read List rule sets; type filter.
glrules_rule_set_get Read One rule set by id.
glrules_rules_list Read A set's rules by priority type.
glrules_rules_check_default Read Has a default rule already?
glrules_budgets_list Read Budget rows for a year.
glrules_setting_get Read A named tenant setting.
glrules_surcharge_account_get Read Surcharge setting to its account.
glrules_lookup_resources Read Resources as rule targets.
glrules_lookup_product_types Read Product types as rule targets.
glrules_lookup_product_sub_types Read Product sub-types.
glrules_accounting_entries_list Read Generated accounting entries.
glrules_batch_runs_list Read Sales/payment batch runs.
glrules_batch_entries_list Read One batch run's entries.
glrules_invoice_batches_list Read List invoice batches.
glrules_invoice_batch_get Read Batch detail incl. line items.
glrules_invoice_batch_preview Read Dry-run; persists nothing.
glrules_invoice_batch_redownload Read Re-download an export; no status change.
glrules_account_save Guarded write Create or update a GL account.
glrules_account_delete Guarded write Soft-retire a GL account.
glrules_rule_set_save Guarded write Create/update a dated set; type immutable.
glrules_rule_set_delete Guarded write Soft-delete a set; rules not cascaded.
glrules_rule_save Guarded write Create or update one rule.
glrules_rule_delete Guarded write Soft-delete one rule.
glrules_rules_bulk_create Guarded write Bulk-create rules on a set.
glrules_rules_copy Guarded write Copy all live rules between sets.
glrules_budgets_upsert Guarded write Bulk upsert budgets by account/year/month.
glrules_budgets_import Guarded write Import budgets; merge or replace.
glrules_budgets_copy_year Guarded write Copy a year's budgets onto another.
glrules_budgets_delete_year Guarded write Hard-delete a year's budgets (irreversible).
glrules_setting_set Guarded write Upsert a named setting.
glrules_surcharge_account_set Guarded write Set/clear the surcharge account.
glrules_batch_set_status Guarded write Set/clear batch export/post markers.
glrules_batch_catchup_run Guarded write Reprocess a batch range; may reverse entries.
glrules_invoice_batch_create Guarded write Execute a batch, creating invoices.
glrules_journal_export Guarded write Export a batch-run journal.
glrules_invoice_batch_export Guarded write First export; marks the batch exported.

Rules worth knowing

  • Date overlap is enforced per entry type: two revenue sets may never share a day, but a revenue and a commission set may overlap freely; the entry type is immutable after creation.
  • Resolution escalates resource → product sub-type → product type → default. At most one default rule should exist per set; tool-checked, not enforced on delete.
  • Deletes are soft except budgets: accounts, rules and sets are reversible; year-budget deletion is immediate and irreversible, as is replace-mode import/copy.
  • Catch-up reprocessing is destructive: it can create and reverse entries, is capped at a 31-day window ending before today, and requires explicit confirmation of range and batch type.
  • Invoice dispatch and exports: preview is a true dry run; execution creates real invoices — preview first. Export content returns inline only when the server responds with JSON; binary payloads must be fetched through the app. First export stamps the batch exported; redownload changes nothing; markers can also be reset explicitly. Rule targets are not pre-checked — validate ids via the lookup tools first.
  • Payment terms — invoice-batch dispatch honours these terms.
  • Settings — canonical owner of the surcharge-account setting.
  • Commissions — commission allocations depend on agent setup.
  • Bookings — bookings source all accounting entries.

See it on your operation

A 30-minute call. We show you the platform with your routes, your fleet, your numbers. No slideshow, no high-pressure sales.

Book a Demo