612 tools · 109 domains
- agents6
- ai10
- aiQuestions9
- ai_questions2
- anliegen2
- api_keys1
- assistant1
- availability1
- beds249
- beherbergungssteuer3
- billing1
- breakfast4
- buchungsbedingungen2
- cannedResponses5
- channels6
- channex11
- checkin18
- cityTaxSettings2
- city_tax2
- concierge3
- contacts12
- dashboard5
- deposit_settings2
- direktInsights1
- direktangebot4
- direktseite5
- disclosure1
- einordnung3
- ereignisse1
- folio15
- fritzbox-calls8
- fritzboxCalls2
- gaeste3
- gaesteCodes9
- guest-billing3
- guests1
- guidelines4
- handover5
- hochpreistage1
- hotelFacts5
- hotel_facts3
- hotel_info_sections2
- housekeeping16
- ical-quellen2
- identity1
- inbox6
- invoices27
- kassenbuch8
- lernen5
- lost-found2
- lostFound3
- me2
- members3
- messages21
- messaging-rules3
- messagingRules11
- messaging_rules7
- notificationRules9
- obergrenze3
- onboarding2
- orders9
- payouts2
- plan1
- preiskalender2
- preisstrategie5
- properties5
- rabattcodes5
- rate-plans1
- rate-suggestions7
- rateSuggestions1
- rates22
- rechnungsabsender2
- registration-settings2
- reinigung2
- reports3
- restliste1
- review-requests1
- reviews7
- ring8
- security-access-log1
- security-cameras7
- security-events1
- smart-locks5
- smartLocks18
- stayAccess3
- stays44
- taskRules9
- tasks19
- tenants31
- till11
- unbepreist1
- upsell5
- vermietungAnfragen6
- vermietungBelegung5
- vermietungEinstellungen2
- vermietungHaeuser3
- vermietungMietverhaeltnisse3
- vermietungWohnungen7
- voice2
- voice-availability1
- voice-calls2
- voice-facts1
- voice-hold1
- voiceCalls2
- vorfaelle4
- webhooks2
- wettbewerb1
- zimmerWissen4
- zimmerbilder1
agents
agents.configurewritesUpsert per-tenant agent configuration. Owner-only. Mutation — changes data.
agents.listread-onlyList all registered agents with their per-tenant config (enabled, schedule, guardrails) and last run status.
agents.proposals.listread-onlyList agent proposals awaiting human review. Defaults to pending proposals only.
agents.proposals.reviewwritesconfirmApprove or reject an agent proposal. Approved proposals are logged; execution is handled by the application layer.
agents.runs.listread-onlyLists the runs of the property's AI agents (a log of every agent run), newest first, paginated (page, pageSize up to 100), optionally filtered to one agent (agentId). Requires the ai_agents module. Read-only.
agents.triggerwritesconfirmManually trigger an agent run. The agent will run asynchronously; check agents.runs.list for status.
ai
ai.acceptDraftwritesconfirmAccept an AI-drafted reply and deliver it to the guest now. This is a real guest-facing send over the booking channel. Requires confirmation.
ai.antwortModusread-onlyReads the AI reply switch (off, suggestions only, on) and whether AI replies are enabled for the property. Owner only. Read-only query.
ai.discard_draftwritesDiscard an AI-generated draft reply. Deletes the draft message and logs the discard for trust-ramp acceptance-rate accounting.
ai.kiVersandStoppenwrites“Stop” on an AI suggestion during the recall window: the scheduled automatic send is cancelled and the draft stays as a suggestion. The inbox also calls it on the first keystroke in the draft. Mutation — changes data.
ai.latestDraftForConversationread-onlyLatest draft (AI suggestion) for a conversation, if any. The suggestion-card component fetches this on every drill-down render + after the SSE-driven cache invalidation. Read-only query.
ai.metricsread-onlyAI dashboard data for the tenant: current mode (suggest/auto), 7-day acceptance metrics, auto-mode eligibility, current-month spend, and the last 50 invocations, plus this month's model calls per purpose and model (calls, tokens, list-price cost in cents). Read-only.
ai.previewVoiceStylewritesSide-by-side brand-voice preview: composes the same guest message with and without style anchors so the operator can feel the delta before deciding to enable/disable voice training. Mutation — changes data.
ai.setAntwortModuswritesChanges the AI reply switch: off, suggestions only (drafts) or on (safe answers are sent automatically). Owner only; writes an audit entry with the old and new value. Takes effect only for properties where AI replies are enabled. Mutation — changes data.
ai.set_modewritesconfirmFlip tenant AI mode between 'suggest' (operator approves each draft) and 'auto' (eligible drafts auto-send). Going to 'auto' requires the trust-ramp gate (7d soak + 5+ drafts + ≥80% acceptance) — server-side re-check; throws on failure. 'auto' -> 'suggest' is always allowed (kill-switch). Mutating action — requires _confirm: true.
ai.update_draftwritesSave an edited body for an AI-generated draft reply without sending it. The draft stays a draft; accept it later to deliver the edited text. Errors: draft_not_found, not_a_draft.
aiQuestions
aiQuestions.createwritesCreates a new FAQ topic (name, topic, optional trigger phrases, default answer, translations, threshold, enabled) used to recognize and answer incoming guest questions. Owner only. Changes data; a topic that already exists results in CONFLICT. Mutation — changes data.
aiQuestions.deletewritesconfirmDelete a custom AI question/FAQ entry.
aiQuestions.getread-onlyReturns an FAQ topic by its id (trigger phrases, default answer, translations, threshold, enabled). Any signed-in role. Read-only; an unknown id results in NOT_FOUND.
aiQuestions.installDefaultPackwritesInstall the 9-topic default seed pack on the current tenant. Idempotent. Mutation — changes data.
aiQuestions.listread-onlyLists all FAQ topics of the property (trigger phrases, default answer, translations, threshold, enabled/auto-send), sorted by topic. Any signed-in role. Read-only.
aiQuestions.setAutoSendenwritesSends the answer to this question automatically: after 10–30 s, once per booking, only if the message really asks only this question. Owner only — from then on Foyer writes to guests in the owner's name without anyone reviewing it. Mutation — changes data.
aiQuestions.setEnabledwritesTurns an FAQ topic (id) on or off via enabled without touching its texts. Owner only. Changes data. Mutation — changes data.
aiQuestions.testMatchread-onlyRun the classifier locally against a typed test message, return the match preview. Does NOT send anything — read-only side-effect-free. Used by the editor's "Test" button so operators can sanity-check a topic before activating it.
aiQuestions.updatewritesPartially updates an existing FAQ topic (only the fields passed: name, topic, trigger phrases, default answer, translations, threshold, enabled) and refreshes its embedding. Owner only. Changes data. Mutation — changes data.
ai_questions
ai_questions.regenerate_embeddingswrites(Re)compute semantic embeddings for every FAQ question using the tenant's current detection provider. No-op when the mode is 'lexical' (returns embedded=0) or the provider's API key is absent from the server env (returns missingKey=true). Calls the embedding provider API. Owner-only.
ai_questions.report_false_positivewritesMark an FAQ question as a false positive — increments its false_positive_count, which feeds the detection-accuracy analytics. Use when the classifier matched a question it shouldn't have. Mutating.
anliegen
anliegen.listeread-onlyThe guest's open and settled requests for a stay — questions from their messages and wishes from the guest portal — oldest first, without those marked as not a real request. A portal wish without its task is left out. Settled source `aufgabe`: the wish's task is done. Read-only query.
anliegen.setzenwritesMarks a guest request as done (`erledigt`), reopens it (`offen`) or marks it as not a real request (`falsch`). For a guest-portal wish this completes or reopens its task, with all the effects of `tasks.updateStatus`. If the request is already in that state, nothing happens (no new timestamp, no audit entry). Mutation — changes data.
api_keys
api_keys.listread-onlyRead-only list of API keys: id, name, prefix (first 12 chars, e.g. fk_live_a1b2), createdAt, lastUsedAt, revokedAt. Secrets are never returned. **Create/revoke are deliberately not exposed via MCP** — they would enable privilege escalation. Use the web UI.
assistant
assistant.askwritesAnswer a question directly for an inbound asker (phone and/or email), grounded ONLY on what their trust tier is permitted to see for the current tenant. A contact/staff member gets internal guidelines; a verified guest gets their own booking/keybox; a stranger or a low-trust channel gets only general info and a polite refusal for anything else. Pass channel (whatsapp/hospitable = high trust, email/voice = low) so sensitive data unlocks only on verified channels. Never reveals data outside the asker's tier. Answering costs an LLM call and is billed to the tenant's daily AI spend, so this is not a free lookup — it is not available to read-only keys.
availability
availability.queryread-onlyCheck room availability for a date range. Returns rooms (by type and room name) that are NOT blocked for any night in [checkIn, checkOut). Optionally filter by roomType. Each result includes the room id, name, type, and the current price from the default rate plan for checkIn (if set).
beds24
beds24.connectwritesCreates a connection to a Beds24 property. Starts as `pending`. Mutation — changes data.
beds24.deleteMappingwritesDeletes a Beds24 mapping (Foyer room, room type or rate plan to a Beds24 room or offer) by id. Owner only. Changes data in Foyer; nothing is deleted in Beds24 itself. Mutation — changes data.
beds24.listread-onlyConnections along with their activation state. `globallyEnabled` is included so the UI can explain why an "active" connection still pushes nothing: both switches must be on. Read-only query.
beds24.mappingOverviewread-onlyBoth sides of the mapping, plus the Foyer rooms without a counterpart. Read-only query.
beds24.saveMappingwritesMap a room. Unlike before, mapping two Foyer rooms to the same Beds24 row is NOT refused: that is exactly the hotel model (eleven rooms, one row with eleven units), and it remains explicitly allowed. Mutation — changes data.
beds24.seedLogread-onlyWhat the seed has created so far: the trail in case of a duplicate. Read-only query.
beds24.seedPreviewread-onlyPreview of the existing-bookings seed; writes nothing. For an operation that creates state in a third-party system and cannot be rolled back, the preview is no luxury. It also shows how many stays would be skipped for lack of a room assignment or mapping; those nights would remain sellable in Beds24. Read-only query.
beds24.seedRunwritesRuns the seed. Idempotent via `beds24_seed_log`. Mutation — changes data.
beds24.setStatuswritesActivates (`active`) or disables (`disabled`) the Beds24 connection. Activation is refused while a direct Booking.com/Expedia connection is active — two systems pushing to the same channels cause overbookings. Disabling always works. Mutation — changes data.
beherbergungssteuer
beherbergungssteuer.monatread-onlyThe report for one month, by date of overnight stay. Basis for the monthly filing to the city. Read-only query.
beherbergungssteuer.setzeUnentgeltlichwritesconfirmMark a stay WITHOUT a price as free of charge (unentgeltlich, e.g. owner use or friends) so it is excluded from the monthly city-tax (Beherbergungssteuer) return — or undo that mark. Rejected for stays that have a price. Tax-relevant; the operator decides. Requires confirmation.
beherbergungssteuer.setzeUnentgeltlichAbwritesconfirmSet — or clear with null — the date from which a PAID stay was free of charge (unentgeltlich ab, e.g. staff or owner use after the paid nights). Nights starting on or after that calendar day are excluded from the monthly city-tax (Beherbergungssteuer) return at once. The mutation itself does not touch the folio: its tax line follows on the next head-count heal or folio reset. The date must lie after the check-in day and at the latest on the check-out day; stays without a price are rejected, and stays without check-in/check-out cannot get a date (clearing it always works). Tax-relevant; the operator decides. Requires confirmation.
billing
billing.summaryread-onlyRead-only billing summary: tenant name, room count, computed monthly price (cents), Stripe subscription state, trial-end, and whether a Stripe customer/subscription exists. `wirksamerStatus` is the status that actually applies (e.g. `testphase_abgelaufen` while the stored `subscriptionStatus` still says `trialing`); `aboStufe` is laeuft/warnung/gesperrt. Schreib-Ops (Checkout, Portal) bleiben Web-UI-only.
breakfast
breakfast.confirmwritesConfirms a breakfast booking (id) with the actual number of guests (pax) and an optional note, and sets the confirmation timestamp. Owner only. Changes data. Mutation — changes data.
breakfast.getSettingsread-onlyReturns the property's breakfast settings (enabled, price in cents, currency); without an entry, breakfast is off. Any signed-in role. Read-only.
breakfast.listForDateread-onlyLists the breakfast bookings for one day (date as YYYY-MM-DD) with number of guests, note and confirmation status. Any signed-in role. Read-only.
breakfast.setSettingswritesSets the property's breakfast settings: enabled, optional priceCents (price in cents) and currency (default EUR). Owner only. Changes data. Mutation — changes data.
buchungsbedingungen
buchungsbedingungen.listeread-onlyAll rate plans of the property with the rule that applies to each. Read-only query.
buchungsbedingungen.setzenwritesconfirmSet the cancellation/refund policy (Buchungsbedingungen) of one rate plan for DIRECT bookings: a grace window in hours after booking (full refund) plus up to five tiers {tageVorAnreise, erstattungProzent}, strictly descending in days AND percent. Hospitable templates: non_refundable {24h, []}, strict {24h, [30d 50%]}, balanced {24h, [30d 100%, 7d 50%]}, easy {24h, [2d 100%]}. Applies to FUTURE bookings only — existing bookings keep their snapshot. Owner-only. Requires confirmation.
cannedResponses
cannedResponses.createwritesCreates a new canned response for replies to guests (name, message, optional category and tags). Owner only. Changes data; a name that is already taken results in CONFLICT. Mutation — changes data.
cannedResponses.deletewritesconfirmDelete a canned response template.
cannedResponses.getread-onlyReturns a canned response (quick reply) by its id. Any signed-in role. Read-only; an unknown id results in NOT_FOUND.
cannedResponses.listread-onlyLists the canned responses (quick replies for guest messages: name, category, text, tags, usage counter), sorted by category and name. Any signed-in role. Read-only.
cannedResponses.updatewritesPartially updates a canned response (id): name, category, text or tags. Owner only. Changes data; an unknown id results in NOT_FOUND. Mutation — changes data.
channels
channels.activate_otawritesconfirmSet a direct Booking.com/Expedia connection from 'pending' to 'active' so rate and availability pushes begin. Call after credentials have been stored via credentials.set. Refused while a Beds24 connection is active — the two must never push to the same channels at once. Mutating action — requires _confirm: true.
channels.connect_otawritesconfirmAdd or update an OTA connection for the current tenant. Creates the connection with status='pending' if it does not exist, or updates hotelExternalId and resets status to 'pending' on conflict. Mutating action — requires _confirm: true.
channels.disconnect_otawritesconfirmRemove an OTA connection for the current tenant. Deletes the connection row; rate pushes to this OTA will stop immediately. Mutating action — requires _confirm: true.
channels.listread-onlyList the ingestion channels (email, whatsapp, voice) with their current state, last-event timestamp, and last-error string. Read-only.
channels.list_ota_connectionsread-onlyList all OTA (Online Travel Agency) connections for the current tenant. Returns booking_com and expedia connections with their status, hotel external ID, last sync time, and last error. Read-only.
channels.set_activewritesconfirmPause or resume a single ingestion channel. active=false sets state to 'paused' (a kill-switch — channel won't auto-recover on next event); active=true clears the pause flag and restores normal state. Mutating action — requires _confirm: true.
channex
channex.activatewritesFlips a connection to active. Refuses while room types are unmapped: an active connection with holes pushes a partial rate set, and Channex answers partial payloads with a 200 plus warnings — silent drift. Mutation — changes data.
channex.channelManagerOverlapread-onlyChannex activation state (global flag + active connection).
channex.connectwritesCreates (or re-points) a connection. Verifies the property is reachable with the stored key before persisting — a connection row that was never confirmed against Channex is worse than no row at all, because the mapping UI would then offer an empty inventory with no explanation. Mutation — changes data.
channex.deleteMappingwritesDeletes a Channex mapping (Foyer room type or rate plan to a Channex id) by id and returns the number of deleted rows. Owner only. Changes data in Foyer; nothing is deleted at Channex itself. Mutation — changes data.
channex.disablewritesPauses without discarding the mapping — the usual rollback. Mutation — changes data.
channex.disconnectwritesRemoves the connection and, by cascade, its mappings. Mutation — changes data.
channex.fullSyncwritesRuns a full sync now: 500 days of availability, rates and restrictions in two calls (certification test 1). Operator-triggered, so it bypasses the 24h interval that test 13 requires of AUTOMATIC syncs — the point of that rule is to forbid timer-driven full syncs replacing deltas, not to stop a human from repairing drift. The rate-limit throttle still applies. Mutation — changes data.
channex.inventoryread-onlyLive inventory for the mapping UI, alongside Foyer's own room types and rate plans so both sides can be shown next to each other. Read-only query.
channex.listread-onlyConnections plus the activation state. `globallyEnabled` is surfaced so the UI can explain why an "active" connection is still not pushing anything. Read-only query.
channex.listMappingsread-onlyLists the Channex mappings (room type or rate plan to Channex id) of a connection (connectionId). Owner only. Read-only.
channex.saveMappingwritesUpserts one mapping row. The kind/ratePlanId shape is validated here as well as by a CHECK constraint — the constraint is the guarantee, this is the readable error. Mutation — changes data.
checkin
checkin.activeForStayread-onlyStay-detail UI affordance: number of currently valid portal links for a stay (`pending`/`submitted`/`verified`, effective expiry — the later of `expires_at` and check-out + 10 days — still ahead, booking neither cancelled nor on hold), when they were last blocked (`gesperrtAm`, ISO, `null` if never) and when the youngest valid session was created (`juengsteGueltigeAm`) — a block is current only while it is younger. RLS-scoped via the surrounding protectedProcedure, so the operator cannot probe… Read-only query.
checkin.clear_waiverwritesClear a guest's Meldeschein waiver on a pending check-in session — e.g. after the ID-OCR contradiction warning shows the guest is not domestic after all. The portal then asks the nationality question again on the guest's next visit. Only works while the session is still pending.
checkin.createwritesStart a new online check-in session for a stay.
checkin.extract_id_ocrwritesExtract OCR data from a guest ID photo front side using Claude Haiku 4.5 vision. Returns a structured IdOcrResult (vorname, nachname, geburtsdatum, staatsangehoerigkeit, ausweisnummer, address fields, confidence) cached in guest_id_uploads.ocr_data_json. Re-calling returns the cached result without incurring a new Haiku call. Requires a valid 64-char portal token (guest-auth surface). Returns { ok: false, error } for photo_not_found | not_image | cap_exceeded | ocr_failed.
checkin.getread-onlyGet a single check-in session's detail.
checkin.getMeldescheinEntryread-onlyLoad the operator-finalized Meldeschein entry for a stay. Returns null if no entry exists yet. Read-only query.
checkin.getPortalMeldescheinread-onlyLoad the guest-portal submitted Meldeschein for a stay. Looks up the most-recent `submitted` or `verified` checkin_session for the stay, then returns its meldeschein row. Returns null when no portal submission exists. Read-only query.
checkin.get_meldescheinread-onlyGet the finalized operator Meldeschein entry for a stay, or the guest-portal submitted data if no operator entry exists. Returns null when neither source has data for the stay. Prefers the operator-finalized entry (meldeschein_entries) over the guest-portal submission (meldescheine) when both exist.
checkin.listread-onlyList check-in sessions, optionally filtered by stay/status.
checkin.list_guest_id_uploadsread-onlyList all guest ID document uploads for a given stay. Returns metadata including guest name, index (0 = primary booker, 1+ = co-travelers), photo URLs for the photo-serve endpoint, and upload timestamps. Only owner and staff roles may call this tool.
checkin.markVerifiedwritesMark a guest's submitted check-in / ID as operator-verified.
checkin.portalLinkread-only“Copy link” in the click window of the timeline: the guest's portal link as the guest receives it — an existing short link (`<origin>/g/<code>`), otherwise the long URL. READ ONLY: `null` without a live session; creates neither a session nor a short link (that is what “send link again” does). Operator roles.
checkin.portalTrichterread-onlyPortal funnel: how far do guests get from “Link verschickt” (link sent) to “Ausweis hochgeladen” (ID uploaded)? Basis is the stays with arrival in the period (default: last 30 days and next 7), excluding cancelled stays, voice holds and mere inquiries. Stages: sent, opened (by humans only, never by link previews), started (any guest action in the portal), registration form (Meldeschein) submitted or waived, ID uploaded — each with count and share. Per stage, the stays that are stuck there… Read-only query.
checkin.revokeForStaywritesconfirmRevoke the online check-in session for a stay. Requires confirmation.
checkin.rotateIdPhotowritesRotates an ID photo by 90° and SAVES the rotation. Only the EXIF Orientation entry is written, losslessly — afterwards the preview, enlarged view, new tab, registration form (Meldeschein) printout and OCR all show the photo the right way up. Staff only; the row is read RLS-bound AND with an explicit property filter, and the path comes from the database, never from the input. Every rotation is recorded in the stay's change history. Mutation — changes data.
checkin.saveGuestPhonewritesPUBLIC — no auth. The guest enters a phone number in the portal (arrival time section). Reason, 2026-10-09: since 28 September 2026, Booking.com no longer passes phone numbers on to channel managers. Mutation — changes data.
checkin.upcoming_without_sessionread-onlyList stays arriving in the next 14 days that have no checkin_session yet — i.e. guests who have not received a portal link. Use this to identify who needs a Pre-Arrival link sent before their arrival. Returns up to 50 rows ordered by check-in date ascending.
checkin.upsertMeldescheinEntrywritesCreate or update a guest's Meldeschein (German registration) entry.
cityTaxSettings
cityTaxSettings.getread-onlyCurrent tenant's city-tax config; sensible defaults if none saved yet. Read-only query.
cityTaxSettings.updatewritesUpsert the config (owner only). Amount is taken in EUR, stored as cents. Mutation — changes data.
city_tax
city_tax.getread-onlyRead the current tenant's accommodation-tax (Beherbergungssteuer / Kurtaxe / city tax) configuration. Fields: enabled, label, method (per_booking | per_night | per_person_booking | per_person_night | percent_total), flatCents (€ amount ×100, for the flat methods), percent (for percent_total), vatRatePct, maxNights (taxable-nights cap, null = none), adultsOnly (children exempt), includedInTotal (carve out of the booking total vs. add on top). Read-only.
city_tax.updatewritesUpsert the tenant's accommodation-tax config. `method` selects how the tax is computed: per_booking (flat per booking), per_night (flat × nights), per_person_booking (flat × persons), per_person_night (flat × persons × nights), or percent_total (percent of the booking total). `amountEur` is the € amount for the flat methods; `percent` is used for percent_total. `maxNights` caps taxable nights (null = no cap). `adultsOnly` exempts children. `includedInTotal` carves the tax out of the booking total instead of adding it on top. Owner-only.
concierge
concierge.addwritesAppends a new note to the concierge log for a stay. tenantId is injected from ctx (never from the client). userId is set from ctx.userId so the authoring operator is recorded. Mutation — changes data.
concierge.deletewritesconfirmDelete a concierge recommendation item.
concierge.listread-onlyReturns the 50 most-recent concierge log entries for a stay, newest first, with the authoring operator's name. Read-only query.
contacts
contacts.deletewritesDelete a contact by id. Phones cascade via FK. Returns { ok: true } or throws if not found.
contacts.getread-onlyFetch a single contact by id for this tenant. Returns { contact } with phones embedded, or throws if not found. DRY: delegates to the shared getContact() query (same as the tRPC router).
contacts.guestread-onlyGet a single guest profile by id (name, email, phone, locale). DRY: delegates to getGuestById() (same as tRPC contacts.guests.byId).
contacts.guestBilling.deletewritesconfirmDelete a guest's billing/invoice address.
contacts.guestBilling.listread-onlyList all billing addresses for a guest. Returns { addresses: GuestBillingRow[] }. Read-only query.
contacts.guestBilling.upsertwritesCreate or update a billing address. If isDefault:true, clears other defaults first (transactional via withTenant tx). Returns { address: GuestBillingRow }. Mutation — changes data.
contacts.guests.byIdread-onlyFetch a single guest profile by id. Returns the GuestProfile or throws NOT_FOUND. Delegates to getGuestById() in queries.ts (same as MCP twin contacts.guest). Read-only query.
contacts.guests.setEmailwritesSet the canonical email for a guest. Writes guests.canonical_email — the valid address to which the invoice and portal link are sent (the previous one stays in weitere_email). Operations roles only, like stays.gastKontaktSetzen. Returns { ok: true } or throws NOT_FOUND. Mutation — changes data.
contacts.invoice-guestsread-onlyList guests that have at least one billing address (the 'Rechnungsgäste'). Each guest carries its billing addresses including the reservation number (reservationRef). Optional search filters over guest name/email and billing company. Default limit 25, max 100. DRY: delegates to the shared invoiceGuests() query (same as the tRPC router).
contacts.listread-onlyList paginated contacts for this tenant. Supports category filter (reinigung/rezeption/hausmeister/dienstleister/sonstig) and free-text search across display name, company, email, and phone number. Ordered by display name ASC. DRY: delegates to the shared listContacts() query (same as the tRPC router).
contacts.search-guestsread-onlySearch guests for linking to a contact. Searches over guest name, canonical email, and canonical phone number. Default limit: 25. Max: 100. DRY: delegates to the shared searchGuests() query (same as the tRPC router).
contacts.upsertwritesCreate or update a contact with its full phones set. If id is provided, updates the existing contact; otherwise creates a new one. Transactional: diffs the phones set (delete removed, insert/update remaining). Enforces UNIQUE(tenant_id, phone_number) across contacts — throws CONFLICT if a phone number is already assigned to another contact. Returns { contact } with phones embedded.
dashboard
dashboard.aiAnalyticsread-onlyAI metrics over a chosen time window. Powers /analytics. Returns messages-by-direction (volume), AI-layer distribution (which layer handled what), and the auto-reply rate — the V1 spec's "AI-Auto-Reply-Rate" KPI: share of inbound guest messages answered by a rule|llm message within 24 h. Read-only query.
dashboard.jobZustandread-onlyState of the background jobs NOW: per queue the last success and failure, counters for the last 24 h, schedule, and whether a monitored reconciliation is overdue — e.g. “is the WhatsApp reconciliation running?”. Problems first. Error texts only from jobs of this property. Owner only. Read-only query.
dashboard.navZaehlerread-onlyTwo numbers for the sidebar grouped by area: `postfachOffen` = conversations waiting for a reply (the same count as `handover.briefing.messagesUnanswered`: per booking, last message from the guest, excluding cancellations and conversations marked done by hand); `aufgabenDringend` = urgent tasks that are neither done nor cancelled (like `dashboard.summary.tasksUrgent`). Any signed-in role. Read-only.
dashboard.summaryread-onlyGet the operator dashboard's summary KPIs (occupancy, revenue, etc.).
dashboard.todayread-onlyOperator home snapshot: inbound messages in the last 24h, open tasks, urgent tasks, stays checking in/out today, and stays arriving in the next 7 days. Read-only.
deposit_settings
deposit_settings.getread-onlyGet the current tenant's pre-arrival deposit (Kaution) setting: whether a deposit is requested from guests (`enabled`) and the amount in cents. Read-only.
deposit_settings.updatewritesEnable or disable the pre-arrival deposit (Kaution) for the current tenant and set its amount in cents. When enabling, amountCents must be > 0. When disabling, the amount is preserved. Owner-only.
direktInsights
direktInsights.summaryread-onlyKey figures of the direct booking page for a period (woche, monat or 30tage): unique visitors, page views, bookings, revenue in cents, and a daily series. Requires the direct module. Read-only.
direktangebot
direktangebot.erneutSendenwritesconfirmSend a direktangebot's payment-link email again after the first send failed or stayed unclear. This sends a REAL email to the guest. Only allowed while the 24-hour hold runs and the mail was not confirmed as sent. Requires confirmation.
direktangebot.sendenwritesconfirmHold a room for 24 hours and send the guest a payment-link offer. This sends a REAL email to the given address (it cannot be recalled) and blocks the room on all channels until the guest pays or the hold expires. Pass the room, dates, adults, the recipient and the language, plus EITHER the stay the offer is made at (`ursprungStayId`: the guest is that stay's guest) OR, for an offer without a booking, `gastName` (required) and optionally `telefon` and no `ursprungStayId`: the guest is then found in the house by email AND name, or created, and an existing guest is never overwritten. Without a booking, channel forwarding addresses (e.g. …@guest.booking.com) are rejected; use the stay for those guests. Giving both is an error. `betragCents` overrides the proposal (total incl. accommodation tax) and is required when there is no bookable rate. Call `direktangebot_vorschlag` first to see availability and price. Requires confirmation.
direktangebot.vorschlagread-onlyProposal for a direct offer: whether the room is free in the period and what it costs (room price per night plus accommodation tax, same as the direct-booking checkout). With `ursprungStayId` (appending a night to a stay) and no further parameters it defaults to the same room, the night after the stay's departure, the stay's adults, the guest's email address and the guest's language. Without `ursprungStayId` (an offer without a booking) `roomName`, `checkIn` and `checkOut` are required (otherwise `angaben_fehlen`). Without a bookable rate `vorschlag.tarif` is empty, and an amount must then be given when sending. Writes nothing.
direktangebot.zuAufenthaltread-onlyThe direct offers made at a stay OR whose hold stay it is (offers without a booking sit at their hold stay), newest first, each with a state: `offen` (open), `bezahlt` (paid), `abgelaufen` (expired), `versand_fehlgeschlagen` (send failed) or `versand_unklar` (send unclear). `stayId` is the offer's hold stay, `ursprungStayId` the stay the offer was made at (empty without a booking); `kurzlink` is the payment link for offers whose hold is still running. Read-only.
direktseite
direktseite.bausteineread-onlyWhat the editor chooses from: image gallery (deduplicated) and rooms. Read-only query.
direktseite.logoHochladenwritesUploads the property logo (Base64, PNG/JPEG/WebP/SVG) — same route as the settings page: validated, logged, immediately live on the booking page. Owner only. Mutation — changes data.
direktseite.speichernwritesREPLACES the ENTIRE booking-page draft (direktseite.stand's `entwurf`) — every field, not a partial patch. Any field you omit reverts to its default (heroBilder/zimmer become empty, social and texte become empty, bewertungenAnzeigen/seiteOnline become true), silently wiping images, room selection, social links, room-page texts and video if you only mean to change e.g. the title. `texte` holds the plain-text room-page sections (hinweise, hausregeln, nachbarschaft, gastzugang, anreise) — public, so never put door or key-safe codes there. `impressum`, `agb` and `datenschutz` are the property's own legal notice, terms and privacy policy (plain text; they become the pages /impressum, /agb and /datenschutz) — omitting them DELETES them from the draft, and publishing that draft takes the legal pages offline. Call `direktseite.stand` FIRST, take its `entwurf`, and send ALL fields back with only the intended change applied. This writes the DRAFT only — guests never see it. Publishing (`direktseite.veroeffentlichen`) is Web-UI-only, done by a human after reviewing the preview.
direktseite.standread-onlyDraft and published state of the property's own booking page. Read-only query.
direktseite.videoHochladenwritesUploads a video (MP4/WebM) for the booking page — it lands in the DRAFT; guests only see it after `veroeffentlichen`. Via tRPC/MCP at most 7 MB (`VIDEO_MAX_BYTES_RPC`); larger files in the browser. Owner only. Mutation — changes data.
disclosure
disclosure.assembleread-onlyAssemble the gated context an inbound caller (phone and/or email) is allowed to see, for the current tenant. Resolves the caller to a trust tier (B2) and returns ONLY the permitted items (internal guidelines, general info, wifi, own keybox, own booking), each tagged with its access (autonom|draft|deny). Deny categories are never fetched; keybox is scoped to the caller's own stays. Pass confidence 'high' only for a verified channel (spoofable caller-ID = 'low'). Read-only.
einordnung
einordnung.modusread-onlyReads the switch for triage of incoming guest messages (off, shadow, on). Owner only. Read-only query.
einordnung.setModuswritesChanges the switch for triage of incoming guest messages: off, shadow (triage only, invisible) or on (inbox order and push for a guest on site without access or in danger). Owner only; writes an audit entry with the old and new value, the same value changes nothing. Also returns whether the property has an active notification rule for incidents — without one, no push arrives when on. Mutation — changes data.
einordnung.zuerstBeantwortenread-only"Answer first": up to ten open conversations (last message from the guest, not marked done — same rule as the "Unanswered" filter), highest score first, the newer message first on a tie. Conversations where no action is expected are left out. Only when triage is on, otherwise empty. Returns category, action and score per conversation, never message text. Read-only query.
ereignisse
ereignisse.imZeitraumread-onlyDemand events (e.g. trade fairs) in the property's region in the period from to to (YYYY-MM-DD), together with the per-night price premium measured from competitor prices. Empty if no region is set. Any signed-in role. Read-only.
folio
folio.addLinewritesAdd a charge line (room/extra/tax) to a stay's folio.
folio.addPaymentwritesRecord a payment against a stay's folio.
folio.closewritesClose the folio for a stay by setting folio_closed_at to now(). Should only be called when balanceCents = 0. Throws folio_not_found if the stay is invisible to the caller's tenant (RLS).
folio.closeFoliowritesconfirmClose a stay's folio. Irreversible once balanced — no further edits. Requires confirmation.
folio.line.updatewritesOverwrite the quantity and unit price (cents) of an existing folio line. totalCents is recomputed as qty × unitCents. RLS: a line outside the caller's tenant is invisible — throws folio_line_not_found.
folio.listread-onlyList all folio charge lines for a stay, ordered by date then creation time. Returns room_charge (auto-seeded on check-in) and any operator-added extras. RLS: caller sees only lines belonging to their tenant. Read-only.
folio.listPaymentsread-onlyLists the payments recorded on a stay's folio (stayId), newest first: amount in cents, payment method, note. Any signed-in role. Read-only.
folio.payment.addwritesRecord a payment against a stay folio. Methods: card, bank_transfer, other — cash and voucher only where the house has a certified TSE (otherwise rejected with kassenfunktion_ohne_tse). amount_cents must be > 0. An optional free-text note can be attached. recordedBy is set by Foyer, not by the caller: the OAuth user, or `mcp:<apiKeyId>` for an API key; the input field is ignored. RLS: only payments within the caller's tenant are visible.
folio.payment.listread-onlyList all payments recorded against a stay folio, ordered by recorded_at descending. RLS: only payments within the caller's tenant are returned. Read-only.
folio.payment.removewritesDelete a folio payment by id. Writes an audit_log entry (folio.zahlung_geloescht) with the old amount and method. RLS silence: if the payment belongs to another tenant it is invisible — returns { deleted: false } without an error.
folio.removeLinewritesconfirmRemove a charge line from a folio.
folio.removePaymentwritesconfirmRemove a recorded payment from a folio.
folio.resetwritesReset a stay's auto-seeded folio lines (room_charge + city_tax, addedBy='system') to their computed original state, discarding manual edits. Operator-added extras are kept. Regenerates via folio-init. Refused for a CANCELLED stay (folio_reset_stay_cancelled): its folio follows the channel's counter-booking and is never rebuilt. RLS: the stay must belong to the caller's tenant.
folio.summaryread-onlyReturn aggregated folio totals for a stay: subtotal (net of VAT), vatCents (total tax), totalCents (gross = subtotal + vat), and lineCount. VAT is back-calculated from each line's vatRatePct (totalCents already includes VAT). Read-only.
folio.updateLinewritesEdit an existing folio charge line's description or amount.
fritzbox-calls
fritzbox-calls.contacts.listread-onlyList all call contacts for this tenant, ordered by display name. Contacts enrich the call log (display name + category shown on each call row). Returns { contacts: Contact[] }. DRY: delegates to the shared listContacts() query (same as the tRPC router).
fritzbox-calls.contacts.upsertwritesCreate or update a call contact for this tenant. Conflict key: (tenantId, phoneNumber) — unique per tenant, so calling with an existing phone number updates the display name and category. Returns the upserted contact.
fritzbox-calls.listread-onlyList paginated FritzBox calls for this tenant. Supports filter (all/incoming/outgoing/missed), period (all/today/week/month), free-text search across phone number, guest name, FritzBox device name, and contact display name. Newest-first. DRY: delegates to the shared listCalls() query (same as the tRPC router).
fritzbox-calls.refreshwritesTrigger a FritzBox call import for this tenant. Fetches the current call list from the FritzBox device and upserts any new calls into the database. Returns { imported, duplicates }.
fritzbox-calls.set-callbackwritesSet or clear the callback status on a FritzBox call. 4 states: null = "Offen" (open), 'in_progress' = "In Bearbeitung" (in progress), 'called_back' = "Zurückgerufen" (called back), 'no_answer' = "Kein Anschluss" (no answer). Pass null to reset to open. Returns the updated row. 404 error if call not found (RLS-isolated).
fritzbox-calls.set-notewritesSet or clear the note on a FritzBox call. Empty / whitespace-only input clears the note (stored as null). Text is sanitized (NUL bytes removed) and truncated to 2000 characters. Returns the updated row. 404 error if call not found (RLS-isolated).
fritzbox-calls.statsread-onlyAggregated call statistics for this tenant: today's total and missed calls, average call duration (seconds), and total call count across all time. DRY: delegates to the shared callStats() query (same as the tRPC router).
fritzbox-calls.statusread-onlyCheck the FritzBox connection status for this tenant. Returns { online: boolean; reason?: string }. reason is present when online=false (e.g. 'FRITZBOX_URL not configured').
fritzboxCalls
fritzboxCalls.listContactsread-onlyList contacts for the current tenant (repointed to contacts + contact_phones). Reads: contacts rows, augmented with a primary phone via contact_phones LEFT JOIN. Returns { contacts: Contact[] } — same shape as before (id, phoneNumber, displayName, category, updatedAt) so the /calls UI is unchanged. Read-only query.
fritzboxCalls.upsertContactwritesUpsert a contact for the current tenant (the "+Kontakt" button on /calls). Writes to contacts + contact_phones (new tables). Returns { contact: Contact } — same shape as before. Mutation — changes data.
gaeste
gaeste.dublettenread-onlyThe groups that are the same person, largest first. Read-only query.
gaeste.profilread-onlyThe guest sheet for ONE guest ID, including everything that belongs to the same person, even if it is stored under a different guest ID. Read-only query.
gaeste.rechnungenread-onlyThe invoices of this guest, across all of the guest's guest rows. SEPARATE PROCEDURE BEHIND THE FINANCE MODULE, not part of `profil`: housekeeping and reception may see a guest sheet, but not invoice amounts. If they were in the same return value, the UI would decide what gets disclosed, and the UI is not a permission model. Read-only query.
gaesteCodes
gaesteCodes.codeAnzeigenwritesconfirmReveal the personal keypad code of one booking (only when confirmed or locked). Every call is audit-logged with channel; the value never appears in logs. Operator roles. Requires confirmation.
gaesteCodes.codeNachZimmerwritesconfirmReveal the personal keypad code by room and date instead of booking id. Picks the booking whose night covers the date — on a changeover day the arriving guest, not the departing one. Returns code, stayId, room, arrival and departure. `stay_nicht_gefunden` (NOT_FOUND): no booking that night; `zimmer_mehrdeutig` (PRECONDITION_FAILED): more than one — use the full room name or `codeAnzeigen`. Same rules and audit log as `codeAnzeigen`. Operator roles. Requires confirmation.
gaesteCodes.einstellungenread-onlySettings of personal guest codes for the single active Nuki front door: on/off, active from (date), daily window (arrival from, departure until), live keypad occupancy, and whether personal codes are possible at all (`grund`: keine_nuki_tuer, mehrere_tueren, or abo_noetig when Nuki recently refused with 402/426). Owner only.
gaesteCodes.einstellungenSetzenwritesconfirmSwitch personal guest codes on/off for the single active Nuki front door and set the daily window (arrival from HH:MM ≤ 12:00, departure until HH:MM). Switching on applies to arrivals from TOMORROW; switching off lets existing codes run out. Owner only. Requires confirmation.
gaesteCodes.freigebenwritesconfirmRe-enable a locked personal keypad code (only before its end). Confirmed by read-back (up to ~3 min); without a confirmed code (locked before it existed, or its entry was deleted) the booking returns to planned (`hinweis: neu_geplant`) and Foyer's next run decides again — on arrival day after 14:30 that means the shared code only. Owner only. Requires confirmation.
gaesteCodes.sperrenwritesconfirmLock a guest out — in any state, also before the code exists (then no code is ever created for this booking). Later messages carry no door code for this booking. An existing Nuki entry is disabled (or, if not yet confirmed, deleted) and checked by read-back (up to ~3 min); entries of fallback/failed bookings are deleted, never just disabled. If Nuki does not confirm, the booking is STILL locked, the result carries `hinweis: nuki_unbestaetigt`, and an urgent task asks to check the entry in the Nuki app; calling `sperren` again retries Nuki. On one room of a multi-room booking it locks the whole booking's code. `takt_laeuft` (CONFLICT): Foyer's own run is working on this booking — retry in a moment. Owner only. Requires confirmation.
gaesteCodes.statusread-onlyPersonal front-door keypad code of one booking: state (geplant/angelegt/bestaetigt/gesperrt/deaktiviert/fehlgeschlagen/rueckfall/geloescht, null = no code yet), valid from/until (Foyer enforces the end itself — Nuki carries no time window), end offset in days, last error category, explicit timestamps (confirmed/locked/deactivated/deleted), and keypad openings of this booking. `aktiv` = personal codes are switched on for the house. Called with one room of a multi-room booking, it reports the booking's shared code (`traegerStayId`). Never returns the code value. Operator roles.
gaesteCodes.uebersichtread-onlyCount of confirmed personal guest codes and live keypad occupancy of the front door, with a hint at ≥ 80 (fast_voll) and ≥ 95 (voll — no new personal codes). Owner only.
gaesteCodes.zeitraumAendernwritesconfirmExtend (+) or shorten (−) the validity END of the booking's personal code by whole days (−60…60, not 0); the offset survives later booking date changes. Rejected if the new end is in the past or before the start, or if the code is already deleted. Changes Foyer only (no Nuki call): Foyer switches the code off at the end and deletes it the day after; a code already switched off becomes active again on Foyer's next run if the new end lies in the future. Owner only. Requires confirmation.
guest-billing
guest-billing.deletewritesDelete a billing address by id (tenant-scoped, RLS-enforced). Returns { ok: true } or throws if not found. DRY: delegates to the shared deleteGuestBilling() function (same as the tRPC router).
guest-billing.listread-onlyList all billing addresses for a guest (tenant-scoped, RLS-enforced). Returns { addresses } ordered by createdAt ASC. DRY: delegates to the shared listGuestBilling() query (same as the tRPC router).
guest-billing.upsertwritesCreate or update a billing address for a guest. If id is provided and exists, updates the existing row; if id is provided but does not exist, inserts with that id; if id is omitted, inserts with auto-generated id. If isDefault:true, atomically clears all other defaults for the guest first (the clear + set run inside the same withTenant() transaction — partial-unique safe). Returns { address: GuestBillingRow }. DRY: delegates to the shared upsertGuestBilling() function (same as the tRPC router).
guests
guests.set-emailwritesSet the canonical email (guests.canonical_email) for a guest — the address all mail goes to. The previous address (usually the channel relay, e.g. …@guest.booking.com) is kept in guests.weitere_email, not lost. Tenant-scoped via RLS — only the guest's own tenant can update it. Returns { ok: true } or throws if guest not found. DRY: delegates to the shared setGuestEmail() function (same as the tRPC router).
guidelines
guidelines.deletewritesconfirmDelete a guideline by id (owner only).
guidelines.getread-onlyGet one guideline (incl. markdown body) by id for the current tenant. Read-only.
guidelines.listread-onlyList internal staff-handbook guidelines for the current tenant (id, title, type, category, tags, updatedAt). Read-only.
guidelines.upsertwritesCreate or update a guideline (owner only). Provide id to update. Generates an embedding on save.
handover
handover.briefingread-onlyAuto-compiled shift briefing — the operational state the incoming shift needs at a glance, shown above the free-text notes. All counts are tenant-scoped via RLS (`tenantDb`); the unanswered count mirrors `messages.listConversations` (latest message per booking is inbound, cancelled bookings excluded) so the two never disagree. Read-only query.
handover.getTodayread-onlyGet today's shift-handover note.
handover.getYesterdayread-onlyGet yesterday's note (read-only context for incoming shift)
handover.listRecentread-onlyList last N shifts. Read-only query.
handover.savewritesSave the shift-handover note for the day.
hochpreistage
hochpreistage.uebersichtread-onlyBooking pace of the high-price days: for each expensive night, the booking level against the target curve (zu_langsam, im_soll, zu_schnell) together with market, reference property and guest price. Calculates like the nightly price suggestion run but does not set prices; without a default rate plan the list is empty (mitTarif=false). Any signed-in role. Read-only.
hotelFacts
hotelFacts.getInfoSectionsread-onlyRead hotel info sections (wifi, parking, transit, house_rules, checkout, luggage). Read-only query.
hotelFacts.getTimeSettingsread-onlyRead hotel time thresholds (minutes since midnight) for this tenant. Read-only query.
hotelFacts.updateInfoSectionwritesUpdate a single hotel info section (owner-only). Mutation — changes data.
hotelFacts.updateTimeSettingswritesUpdate hotel time thresholds (owner-only). Mutation — changes data.
hotelFacts.upsertwritesUpsert a single fact's value for a given locale (default: "de"). Creates the fact if it doesn't exist (with optional description), merges translations if it does. Also updates description when provided. Pattern A: explicit tenantId eq filter on all DB operations. Mutation — changes data.
hotel_facts
hotel_facts.deletewritesconfirmPermanently delete a hotel fact by its key. All locale translations are removed. Destructive — requires _confirm: true. Owner-only.
hotel_facts.listread-onlyList all hotel facts for the current tenant, ordered by category then key. Facts are key/value pairs used by the pre-arrival guest portal and the %fact:key% substitution renderer. Returns id, key, category, valueTranslations (locale→string map), description, usedBy, verifiedAt, and updatedAt for each fact. Read-only.
hotel_facts.updatewritesUpsert a hotel fact's value for a given locale. If the fact key does not exist it is created; if it exists the locale is merged into the existing valueTranslations map. Category is inferred from the key prefix (e.g. "wifi.password" → category "wifi"). Default locale is "de". Owner-only. Returns the affected row id.
hotel_info_sections
hotel_info_sections.getread-onlyRead all hotel info sections (wifi, parking, transit, house_rules, checkout, luggage) for the current tenant. Missing sections are returned with defaults (enabled: false, content: ''). Read-only.
hotel_info_sections.updatewritesUpdate a single hotel info section. Merges the supplied key into the existing hotelInfoSections JSONB, preserving all other sections. Owner-only.
housekeeping
housekeeping.assignTaskwritesAssign a housekeeping task to a staff member.
housekeeping.completeTaskwritesMark a housekeeping task complete.
housekeeping.createManualTaskwritesCreate an ad-hoc housekeeping task outside the normal schedule.
housekeeping.createRoomwritesCreates a room (name, optional type, floor, defaultCheckoutTime, estimatedCleaningMinutes, priority, specialNotes). Owner only. Changes data; a room name that is already taken results in CONFLICT. Mutation — changes data.
housekeeping.deleteTaskwritesconfirmDelete a housekeeping task.
housekeeping.importRoomsFromStayswritesOne-shot import: pull distinct `stays.room` values that don't yet have a corresponding row in `rooms`, and create them with sensible defaults. Lets a fresh tenant skip manual seeding if they already have stays. Mutation — changes data.
housekeeping.listRoomsread-onlyLists the property's rooms (name, type, floor, corridor side, default checkout time, cleaning duration, priority, special note) by floor and name; when mapped, with room image and unit UUID. Any signed-in role. Read-only.
housekeeping.setRoomMaintenancewritesFlag or clear maintenance state on a room.
housekeeping.skipTaskwritesSkip a task with required reason. Mutation — changes data.
housekeeping.startTaskwritesMark a housekeeping task as started (in progress).
housekeeping.tasks-windowread-onlyCleaning tasks across a date window for the calendar Tasks-view. Returns id, roomName (unit code), floor, date, taskType (checkout/midstay/deep_clean/manual), and status (pending/in_progress/completed/skipped). Read-only.
housekeeping.tasksForDateread-onlyTasks for a specific date. Lazy-creates only when date is today. Read-only query.
housekeeping.tasksForWindowread-onlyCleaning tasks across a date window, for the calendar Tasks-view. One row per task; `roomName` matches rooms.name (and the timeline's unit rows). Read-only — task lifecycle stays on the housekeeping page.
housekeeping.todayOverviewread-onlyDaily overview: today's arrivals, departures, and stayovers. Pure read-only — no lazy task creation. Uses Berlin timezone for "today".
housekeeping.todayTasksread-onlyToday's task queue. Lazy-creates checkout tasks for stays leaving today. Read-only query.
housekeeping.updateRoomwritesChange an existing room's master data — type (e.g. double/triple), guest-facing display name (`anzeigename`, max 80 chars; empty/null = derive it again), floor, cleaning minutes, priority, note. The display name is what guests see on the booking page, room page, room choice and in messages. The room NAME cannot be changed here: bookings, calendar days and the channel mapping all key off it.
ical-quellen
ical-quellen.listread-onlyConnected external iCal calendars (one per room): platform, active, last fetch, last error, number of entries. The link itself is shortened — it contains the platform's secret token. Owner only. Read-only.
ical-quellen.removewritesconfirmDisconnect one external iCal calendar (id from `ical-quellen.list`). Its blocked nights are no longer imported; nothing at the platform changes. Re-adding needs the owner in the web UI. Owner only. Requires confirmation.
identity
identity.resolveread-onlyResolve an inbound caller (phone and/or email) to a trust tier for the current tenant: a contact category (reinigung|rezeption|hausmeister|dienstleister|sonstig), 'gast' (a guest with an ACTIVE stay — stayIds included so callers can scope to the guest's own stay), or 'unbekannt'. Contact match beats guest. Read-only.
inbox
inbox.accept_draftwritesApprove an AI-generated draft, swapping aiLayer to 'manual' (operator chain-of-custody). For stay-bound conversations, delivers the message via the channel dispatcher (real outbound send + message.sent event) and removes the draft row. For loose threads (no stay), flips the draft to state=sent in place (flip-only, no delivery). Optional bodyOverride lets the operator edit the suggestion before sending. A draft that reissues an invoice at stay (irreversible, uses a new number) is accepted only with the permissions of invoices.reissue (owner) and confirmReissue: true; otherwise it stays a draft (keine_berechtigung / bestaetigung_fehlt).
inbox.draft_replywritesRun the P2.2 AI pipeline (L0 sensitive / L1 rules / L2 LLM) for a given inbound message and persist a draft outbound message row. Returns the resulting draft. NOTE: This writes a draft (not pure read-only) — operators can then send it via inbox.accept_draft.
inbox.list_by_stayread-onlyList all sent messages (inbound + outbound) for a stay's conversation, oldest-first. Excludes drafts. Read-only.
inbox.list_triageread-onlyPaginated triage feed of messages across the tenant, newest first. Cursor is the ISO timestamp of the last item from the previous page. filter='all' is the only meaningful value in v1; other values currently return the same data (filter logic lands in P2.2).
inbox.list_unansweredread-onlyList up to 50 inbound guest messages where no operator reply has been sent in the same conversation since the inbound. Conversations an operator marked as done („Erledigt“) are left out until the guest writes again. Newest-first. Read-only.
inbox.send_replywritesSend an outbound reply for a stay's conversation. Channel auto-resolves from the latest message in the thread (email/whatsapp/hospitable). Persists the outbound message and emits the message.sent webhook. Refused with `rechnungsabsicht_offen` when the body is the unedited text of an open invoice-reply draft ("invoice just sent") — approve that draft with inbox.accept_draft instead, which emails the invoice first.
invoices
invoices.anStayNachliefernwritesconfirmDeliver ONE stay that the invoicing system (stay/staydb) has never received — new reservations only. Refused if a confirmed delivery exists, if the staydb already has the reservation (checked live), if the stay is incomplete, or before departure (on departure day only once checked out), and for cancelled stays unless auchStorniert. One attempt, 20 s hard timeout; refused while another send of the same stay runs. Pass nurPruefen: true for a dry run. Writes channel_sync_log and the stay's audit trail, then reads back from the staydb. Requires confirmation.
invoices.autopilotStandread-onlyWhat the invoice autopilot decided for this booking's invoices (log, one row per invoice): `senden` (send) or `gestoppt` (stopped) with the reasons (codes of the check rule); in `an` (on) mode additionally the sending sequence `geplant` (scheduled, with time), `gesendet` (claimed for sending; actually sent only once `mailAngenommenAt` is set), `abgebrochen` (cancelled), `fehler` (failed); plus only the recipient's domain. Read-only; invoices without an entry are missing.
invoices.autopilotStoppenwritesStop the scheduled automatic sending of ONE invoice: the invoice autopilot then does not send it, and it waits until someone sends it manually. Only from state `geplant` (scheduled; otherwise PRECONDITION_FAILED `autopilot_nicht_geplant`); sets `abgebrochen` (cancelled) with reason `betreiber_gestoppt` and writes an audit log entry. Mutation — changes data, sends nothing.
invoices.beiStayAusstellenwritesconfirmAsk the invoicing system (stay) to ISSUE the invoice for ONE departed stay (POST /api/invoice/issue/{reservationId}?sendWebhook=false). Assigns a real, irreversible invoice number. Refused for platform 'manual'/unknown unless auchManuell, when stay already has an invoice, or when Foyer's data changed since delivery unless trotzAbweichung, for cancelled stays unless auchStorniert, between 11:55 and 12:15 Europe/Berlin (stay's own daily run), and while another issue is running (global lock). One attempt, 20 s hard timeout. 201 = issued (read back + mirrored), 404 = reservation unknown, 409 = invoice already exists. Pass nurPruefen: true for a dry run. Requires confirmation.
invoices.cancelwritesconfirm**DESTRUCTIVE**: Mark an invoice as cancelled — only Foyer-numbered invoices. An invoice numbered by stay is rejected (`storno_nur_in_stay`): stay has no cancellation. The PDF is preserved as an audit record. Once cancelled, the invoice cannot be resent. Use `invoices.reissue` to create a corrected replacement. Requires _confirm: true.
invoices.create_requestwritesMint a guest-facing invoice-request link for a reservation: creates a submission row (status pending, workflow offen) with a CSPRNG token and returns { submissionId, token, path } where path is the public form URL (/invoice-request/{token}) to send the guest. Throws 'reservation_not_found' if the reservation is not in this tenant.
invoices.erkannteRechnungsangabenread-onlyCompany name and tax number found in the guest's messages — UNCONFIRMED, shown only in the invoice panel while no billing data is on file. Nothing is stored until the operator adopts and saves them. Booking.com often sends both without an address (2026-10-17, reservation 5995772396); `leseRechnungsadresse` then reads nothing. `quelle` is `anker` when an anchor in the text matched (company name, tax number), or `ki` when there is no anchor: then it is the AI's unconfirmed suggestion read from free text, with `strasse`, `plz`, `ort` and `land` (street, postal code, city, country) as far as they were read. Read-only query.
invoices.getread-onlyFetch a single Foyer-native invoice by UUID with joined reservation, address, tax-id and line-items. Throws 'invoice_not_found' if the row is missing or belongs to another tenant. Read-only.
invoices.listread-onlyList Foyer-native invoices (operator inbox + history). All filters are optional: status (draft|created|sent|cancelled|reissued), reservationId (UUID), from/to (YYYY-MM-DD, matched against createdAt), limit (1-500, default 100), offset (default 0). Ordered by createdAt desc. Read-only.
invoices.list_requestsread-onlyList invoice requests (Anfragen): every invoice-eligible booking joined with its latest submission, showing the operator workflow status (offen|in_bearbeitung|versandbereit|erledigt, default offen) and completeness badges (hasAddress / hasTaxId / hasInvoice). Optional filters: workflowStatus, needsInvoice (bookings with no invoice yet), search (guest name/email/reservation code), limit (1-200, default 100), offset. Read-only.
invoices.read_pdfread-onlyRead the text of an issued invoice PDF exactly as sent to the guest / tax advisor (addresses, line items, VAT, totals). Invoice id from `invoices.list` / `invoices.get`. Drafts without a PDF yet return `vorhanden: false`. Owner only. Read-only.
invoices.rechnungsdatenErneutSendenwritesRetries a failed delivery attempt to stay — the button on the red marker. Rationale at `sendeRechnungsdatenErneut`. Mutation — changes data.
invoices.reissuewritesconfirm**DESTRUCTIVE**: Mark an existing invoice as `reissued` and create a fresh draft for the same reservation, with a new sequential number and a `parent_invoice_id` link back to the original. The new draft starts without a PDF (placeholder file refs). Requires _confirm: true.
invoices.remove_request_billingwritesconfirmRemove billing parts from a reservation's invoice request (command-center 'Löschen'): set tax=true to soft-delete the tax-id (is_removed — none shows, survives the daily re-sync), email=true to hard-delete the billing email. Addresses have no delete. Returns the resulting billing. Mutating action — requires _confirm: true.
invoices.request_billingread-onlyCollected billing data for a reservation's invoice request: the latest billing address (name/company, lines, postal code, city, country, isBusiness) and tax-id (value + kind: ust_idnr|steuernummer). Both nullable when the guest hasn't provided them. On a Perk booking, perkTicketAn is the address the invoice must go to instead of email. Read-only.
invoices.request_statsread-onlyInvoice-request pipeline counts for the Anfragen tabs: total + per workflow status (offen, in_bearbeitung, versandbereit, erledigt) + needsInvoice (eligible bookings with no invoice yet). Read-only.
invoices.sendwritesconfirmEmail the invoice to the guest. This is a real send over the configured channel. Requires confirmation.
invoices.send_smtpwritesconfirm**IRREVERSIBLE**: send a Foyer-native invoice PDF to the guest via email. Uses Postmark BYOK if the tenant has configured a token, else falls back to the Gmail SMTP relay. Marks the invoice as 'sent' on success. Once the remote MTA accepts the message there is no way to recall it. Refused with `stornorechnung_offen` for every cancelled stay (any channel, direct bookings included, also with total 0) and for a stay whose folio carries a cancellation fee (the invoicing route for cancellations is still open). Refused with `kuerzlich_versendet:<ISO time>` when the same invoice already went to the same address within the last 24 hours. Mutating action — requires _confirm: true.
invoices.setRequestStatuswritesSet the operator workflow status for a reservation. Lazily materializes a submission row + logs the transition. Mutation — changes data.
invoices.statsread-onlyCounters for the operator dashboard stat-strip: total + per-status (draft, created, sent, cancelled, reissued) for the caller's tenant. Read-only.
invoices.stayAbweichungenread-onlyList stays already delivered to the invoicing system (stay) whose current data no longer matches what was delivered (checksum differs, now incomplete, or no longer eligible e.g. fully refunded) — stay may invoice an outdated state. Read-only. Defaults to departures in the last 30 days; auchAeltere lifts that.
invoices.stayLageread-onlyWhich stay action currently makes sense for THIS booking — the invoice request shows or hides the “Rechnungssystem (stay)” (invoicing system (stay)) section accordingly. Without a transaction: reads staydb through the tunnel (rationale at `moduleProcedureOhneTransaktion`). Read-only query.
invoices.submitFormwritesPUBLIC — no auth. Token-in-URL is the auth principal. The guest opens /invoice-request/{token} (created by the operator on the form_submissions row) and POSTs their billing address. We: 1. Look up the submission row by token via getDb() — outside RLS, since no tenant is pinned yet. Token is CSPRNG and unique. 2. Reject if the row doesn't exist (NOT_FOUND) or has already been submitted (CONFLICT — idempotent re-submit guard). 3. Enter withSystem(submission.tenantId) so all subsequent inserts… Mutation — changes data.
invoices.updateRequestBillingwritesOperator edit of a reservation's billing data (address / tax-id / email) — command-center "Bearbeiten" parity. Each part optional; append-only insert. Mutation — changes data.
invoices.update_addresswritesconfirmUpdate the billing address on a Foyer-native invoice. Inserts a new invoice_addresses row (append-only — old rows stay for audit) and repoints invoices.address_id at it. Use to correct typos / fix incomplete guest submissions. Mutating action — requires _confirm: true.
invoices.update_emailwritesconfirmSet or replace the billing email for a reservation. Inserts a new invoice_emails row (append-only) — send-time logic resolves the latest email by reservation, so this cascades to all future invoices for that stay. Mutating action — requires _confirm: true.
invoices.update_tax_idwritesconfirmSet or replace the tax ID on a Foyer-native invoice. Inserts a new invoice_tax_ids row (append-only — old rows stay for audit) and repoints invoices.tax_id_id at it. `kind` distinguishes USt-IdNr (EU VAT) from Steuernummer (DE local). Mutating action — requires _confirm: true.
kassenbuch
kassenbuch.add_entrywritesconfirmAdd a single cash entry (income or expense) to the ledger. Type is 'income' or 'expense' (note: English, not 'einnahme'/'ausgabe'). If entryDate is omitted, today is used. amount must be > 0. reservationId links the entry to a stay UUID; reservationCode is the human-readable booking code (e.g. 'HM54KEHW5X'). Mutating — requires _confirm: true.
kassenbuch.balanceread-onlyAggregate cash-book balance: total income + expense over all-time, today's income + expense subtotal, and the timestamp of the most-recent entry. Use for 'wie viel ist drin?' (how much is in there?) summaries. Read-only.
kassenbuch.categoriesread-onlyValid income + expense category labels accepted by the cash-book. Pre-context for any add-entry prompt — pick from these values. Read-only.
kassenbuch.closingsread-onlyList the cash book's day-closings (Tagesabschlüsse / Festschreibung). Each closing locks every entry up to its date and carries a SHA-256 hash chained to the previous one, so a later change to a locked period is detectable. Read-only.
kassenbuch.list_for_dateread-onlyCash-book entries for a single date (YYYY-MM-DD). Read-only. Useful for 'was war am 15.04.?' lookups.
kassenbuch.list_todayread-onlyToday's cash-book entries plus aggregated income / expense / net total for the day. Date is computed against the server's CURRENT_DATE (UTC in the DB; convert to Europe/Berlin client-side if needed). Read-only.
kassenbuch.reportread-onlyCash-book report for a date range (from/to inclusive, YYYY-MM-DD). Returns per-category breakdowns + period totals. Read-only.
kassenbuch.storno_entrywritesconfirmReverse a cash entry by booking a COUNTER-ENTRY (German GoBD: the cash book is append-only, nothing is ever deleted). The original row stays; a new row with the inverted type, the same amount and a mandatory reason cancels it out. Booked to the first open day — never into a period that has already been locked by a day-closing. Mutating — requires _confirm: true.
lernen
lernen.jetztAuswertenwrites"Jetzt auswerten" (Evaluate now): the same run as the one at 04:20, started immediately. Mutation — changes data.
lernen.standread-onlyNumber of open suggestions and the last run — for counters and the header. `letzterLauf.fragenErkannt` of `.fragen`: “x von y Gastfragen ohne KI erkannt” (x of y guest questions recognized without AI). Read-only query.
lernen.uebernehmenwritesAccept a suggestion. Adding/removing a phrase and switching auto-send go through aiQuestions.update / setAutoSenden; the person has already done “neue Frage” (new question) and “Antwort anpassen” (adjust answer) in the editor beforehand — here you only tick them off. Mutation — changes data.
lernen.verwerfenwritesDiscard — the same suggestion does not come back (fingerprint). Mutation — changes data.
lernen.vorschlaegeread-onlyOpen suggestions, newest first. Contains guest texts as examples. A knowledge gap with `daten.vorschlagNachricht` gets the text of the team's earlier reply as `daten.vorschlag` here (luecken-historie.ts). Read-only query.
lost-found
lost-found.createwritesRecord a new lost-and-found item for this tenant. Defaults to status=held.
lost-found.listread-onlyList lost-and-found items for this tenant, newest-first. Filter by status (held/returned/shipped/discarded).
lostFound
lostFound.discardwritesconfirmDiscard a lost & found item (marks it disposed of, not returned to a guest).
lostFound.markReturnedwritesMark a held item as returned to its guest. Sets resolved_at + optional notes. Idempotent on second call (no-op via WHERE). Mutation — changes data.
lostFound.updatePhotowritesAttach or replace a photo URL for an existing item. Mutation — changes data.
me
me.ansichtread-onlyReturns the signed-in user's personal display preferences: geplanteImVerlauf (show scheduled messages at the end of the conversation history), automatikEinklappen (collapse automatic messages into one line) and navGruppiert (sidebar grouped by area). Via MCP, those of the OAuth user; an API key is not a person and gets the defaults. Read-only.
me.getread-onlyReturns userId, tenantId and role of the caller. Via MCP: with OAuth the connected user, with an API key `userId: null` and the key's role. Any signed-in role. Read-only.
members
members.invitewritesconfirmInvite a new tenant member (staff, reception, housekeeping, or maintenance). Provide either email OR phone (at least one required). Creates the user row; magic-link delivery is wired in later phases. Mutating action — requires _confirm: true.
members.listread-onlyList all tenant members (owner, staff, housekeeping, maintenance) with their contact and locale. Used as context for task-assignment and scheduling. Read-only.
members.updatewritesconfirmUpdate a tenant member's role and/or module permissions. `role` optional (staff/reception/housekeeping/maintenance — never owner). `modulePermissions`: an array of module keys = explicit override (invalid keys dropped); null = reset to the role default; omit while setting a role = reset to that role's default. Owners cannot be changed here (inhaber_nur_in_der_oberflaeche): granting, removing or editing the owner role happens only in the web UI. Mutating — requires _confirm: true.
messages
messages.anhang_lesenread-onlyRead what a guest attached to a message: a photo comes back as an image (long side 1568 px), a voice message as its transcript, a PDF as its text with page count, a video only as metadata. A scanned PDF is read by OCR on first access; if that takes longer than ~40 s the answer is empty with a `hinweis` that it is still running — ask again in a minute or two, the text is stored. Get the attachment id from the `attachments` array of `messages.listByStay` / `inbox.list_by_stay`. Only message attachments of this property — check-in ID photos are not reachable here.
messages.anruferead-onlyCalls belonging to this stay, for the timeline in the thread. Read-only query.
messages.antwortUebersetzenwritesTranslates your own reply into the guest's language; nothing is sent or stored. Mutation — changes data.
messages.ereignisseread-onlyWhat happened to the booking — booking, payments, extras, cancellation, changes, online check-in, guest-portal requests — as rows for the thread. Read-only query.
messages.erledigtSetzenwritesMark a conversation as done (or undo that): it needs no further reply, e.g. because the guest only wrote "Danke" (thanks) or the question was settled by phone. It disappears from "Unbeantwortet" (Unanswered) (inbox, handover, `inbox.list_unanswered`) and shows no waiting time UNTIL the next message arrives, at which point it reopens by itself. In the UI: swipe left. `geaendert: false` means "was already that way", not an error. Every change is recorded in audit_log. Mutation — changes data.
messages.fadenread-onlyReads a message thread by conversationId, even if it is not assigned to a booking: header (channel, platform, sender name, phone number, last message, stayId if present) and all sent messages including attachments in chronological order. Drafts are not included. Any signed-in role. Read-only; a foreign or unknown id yields NOT_FOUND.
messages.fadenAntwortenwritesReplies to a thread WITHOUT a booking, via WhatsApp. Optional `antwortAufId` (a WhatsApp message of this thread): the reply then goes out as a quote; otherwise `antwort_ziel_ungueltig` is returned and nothing is sent. Mutation — changes data.
messages.fadenVorschlagread-onlyWhich booking does this unassigned thread belong to? A suggestion, not an action. Read-only query.
messages.fadenZuordnenwritesAttaches the unassigned thread to a booking: the visible click that follows the suggestion. Sets ONLY `conversations.stay_id`. Messages stay where they are; the booking page now reads all threads of a stay and labels them by channel, so the WhatsApp history appears alongside the channel's history instead of replacing it. Mutation — changes data.
messages.kanalVorschauread-onlyVia which channel a reply would go out right now, shown at the reply field. Same choice as when sending (`ermittleKanal`); creates nothing. Read-only query.
messages.kiUrteilwritesThe team's verdict on an AI reply: "good" or "bad", for "bad" optionally a short reason (at most 200 characters). A new verdict replaces the old one. The verdicts feed the evaluation of which replies the AI may send on its own in future. NOT_FOUND if the message is not an AI reply of this property. Mutation — changes data.
messages.listByStayread-onlyList all messages for a single stay's conversation thread.
messages.listConversationsread-onlyList guest message conversations (inbox threads).
messages.listUnconfirmedread-onlyoutbound sends whose delivery is not yet confirmed. Surfaces the "Bestätigung fehlt" UI section. Cutoff is 30 minutes: fresh sends (<30min) are noisy because Postmark webhooks haven't had time to fire. Beyond that, anything still in sent / provider_acked / sync_unknown deserves operator attention. Read-only query.
messages.markDeliveredwritesOperator marks a previously-unconfirmed message as verified-delivered. Used after the operator visually checked the provider's dashboard and confirmed the guest got it. Removes the row from "Bestätigung fehlt" without triggering a resend. Mutation — changes data.
messages.offeneKiVorschlaegeAnzahlread-onlyHow many conversations have an open AI suggestion (draft awaiting approval): the counter for "Heute" (Today). Same rule as the badge and the "Vorschläge" (Suggestions) filter in the inbox, scoped to the tenant. Read-only query.
messages.sendwritesconfirmSend a message to the guest on a reservation's conversation thread. This contacts the guest for real over the booking channel (Airbnb/Booking/email/WhatsApp). Optional `antwortAufId` (id of a WhatsApp message in this reservation's thread) sends it as a quoted reply when the message goes out over WhatsApp; otherwise rejected with `antwort_ziel_ungueltig` and nothing is sent. Requires confirmation.
messages.uebersetzenwritesTranslates a guest message into German, once, then stored. Mutation — changes data.
messages.uebersetzungAktivread-onlyIs a translation service set up? Without one, the UI shows no buttons. Read-only query.
messages.ungelesenSetzenwritesMark a conversation as unread (or back as read): its row in the inbox then appears in bold with a dot until someone opens the thread. The target is EXACTLY ONE of `conversationId` (one conversation) or `stayId` (all conversations of the booking, which is how the UI reports opening it). Per conversation, not per user. `geaendert` = number of conversations whose state changed; every change is recorded in audit_log. Mutation — changes data.
messages.whatsappVorlagenread-onlyWhatsApp templates of this stay for the thread: display only, alongside the messages, like the calls. Deliberately NOT `messages` rows, otherwise later rule messages would inherit WhatsApp as their channel. The text carries the codes, so it is available to operations roles only, like the queue. Read-only query.
messaging-rules
messaging-rules.host-historyread-onlyCC-parity 'Verlauf': list ALL outbound Hospitable host messages in an optional date range (YYYY-MM-DD, tenant timezone), attributed to their source — a Foyer messaging rule (by name), Hospitable's own automation ('Automated (Hospitable)'), or a manual host send. Manual sends (included in 'all') are excluded by default (source='all'); pass source='manual' to see them, 'scheduler' for Foyer-rule sends only, or 'hospitable_auto' for Hospitable's automation only. Also returns KPI stats (sent/delivered/failed/tomorrow_planned/week_planned) for the same range. Read-only.
messaging-rules.preview-queue-itemwritesPreview a scheduled (pending) messaging-queue item: renders the message with the CURRENT rule template, custom codes, hotel facts and room overrides — exactly what the sender will produce at fire time. Returns language, subject, body and a skippedReason when the item would be skipped (rule disabled, stay missing, empty template). NOT read-only: rendering a template that uses %checkin_url% or %guide_url% creates the guest check-in session if the stay has none yet.
messaging-rules.send-queue-item-nowwritesSend ONE pending scheduled-message queue item immediately instead of waiting for its scheduled time. Uses the exact same render+dispatch path as the cron sender. Returns status 'skipped' with the reason when the sender drops it (e.g. vorlauf_zu_kurz). Fails with not_pending when the item is not in 'pending' state.
messagingRules
messagingRules.createRulewritesCreate a new automated messaging rule.
messagingRules.deleteCodewritesconfirmDelete a custom message short-code.
messagingRules.deleteRulewritesconfirmDelete an automated messaging rule.
messagingRules.getRuleread-onlyReturns a messaging rule (id) with trigger, time offset, conditions, channel and template. Operations roles only (owner, staff, reception). Read-only; an unknown id results in NOT_FOUND.
messagingRules.kommendeFuerStayread-onlyMessages that are still to come for this stay but fall beyond the 30-day planning window — preview for the activities (`kommendeNachrichten`). Creates nothing. Read-only query.
messagingRules.listCodesread-onlyLists the property's own placeholder codes (variables inserted into message templates as %name%), sorted by name, with default value, translations and condition. Operations roles only (owner, staff, reception). Read-only.
messagingRules.reactivateQueueItemwritesBrings a CANCELLED message back into the automation: it becomes `pending` again and goes out at its originally planned time (if that time has already passed, on the next run). Unlike "Send again" (`sendQueueItemNow` with `erneut`), this sends nothing immediately. Mutation — changes data.
messagingRules.retryQueueItemwritesRetry a failed queued outbound message.
messagingRules.updateRulewritesEdit an existing automated messaging rule.
messagingRules.upsertCodewritesCreates or updates a placeholder code for message templates by name (name, defaultValue, optional description, translations, condition, unit and platform filters). Only optional fields that are passed are overwritten. Owner only. Changes data. Mutation — changes data.
messagingRules.whatsappBilanzread-onlyWhatsApp delivery over the last 7 or 30 days: how many templates were sent, delivered, undeliverable or skipped, and how many numbers are currently marked ✗ (no WhatsApp). Operations roles only. Read-only query.
messaging_rules
messaging_rules.cancel_queue_itemwritesconfirmCancel a PENDING scheduled guest message so it is never sent. Fails if it is no longer pending. Requires confirmation.
messaging_rules.edit_queue_itemwritesconfirmEdit a PENDING scheduled guest message before it is sent — override its subject, body, and/or scheduled time. Fails if the message is no longer pending. Requires confirmation.
messaging_rules.list_queueread-onlyList scheduled + already-sent automatic guest messages across all stays (the queue), newest first, optionally filtered by status (pending|sent|skipped|failed|cancelled). Each item carries the rule name, stay + room, scheduled time, channel, rendered subject, and outcome. A pending item whose rule requires a problem-free guest and whose guest had a problem carries entfaelltWegen='gast_hatte_probleme' (it will not be sent). Read-only.
messaging_rules.list_rulesread-onlyList the tenant's automatic guest-message rules: name, whether enabled, priority, the trigger (reference event + offset in minutes), and the channel. Read-only.
messaging_rules.resend_queue_itemwritesconfirmRe-send an already-processed scheduled guest message (sent|failed|cancelled): clones it to a fresh PENDING row (new instance key, scheduled now) which the sender re-renders from the current rule + stay and dispatches. Bypasses idempotency; the original history row is kept. Requires confirmation.
messaging_rules.scheduled_for_stayread-onlyList the automatic guest messages scheduled for (and already sent to) one stay, ordered chronologically. Read-only. Each item carries the rule name, channel, scheduled time, status (pending|sent|skipped|failed|cancelled), rendered subject/body, and — when applicable — sent time and failure reason.
messaging_rules.seed_pre_arrival_defaultswritesIdempotent seed: creates the 'Pre-Arrival Portal' messaging rule for the current tenant if no rule with triggerReference=check_in and a negative offset exists yet. The rule sends guests a portal link by email 48 hours before arrival (−2880 min offset) with German and English templates containing the %checkin_url% placeholder. Returns { seeded: true } when created, { seeded: false, reason: 'already_exists' } when skipped.
notificationRules
notificationRules.byIdread-onlyReturns a notification rule (id) with trigger, condition, recipient filter, channels and templates. Any signed-in role. Read-only; an unknown id yields NOT_FOUND.
notificationRules.createwritesCreate a new notification rule.
notificationRules.deletewritesconfirmDelete a notification rule.
notificationRules.dryRunwritesDry run of a notification rule that has not been saved yet: replays it against already logged events over lookbackDays (1 to 90, default 30) and reports how often it would have fired, how often a recipient could have been determined, plus up to 10 examples. Owner only. Changes nothing and sends nothing. Mutation — changes data.
notificationRules.executionsread-onlyLists the execution log of a notification rule (ruleId): trigger time, result (sent, condition_false, no_recipient, send_failed, opted_out …), channel used, error text; newest first, 50 per page, dry runs only with includeDryRun. Any signed-in role. Read-only.
notificationRules.listread-onlyLists the property's notification rules (trigger, condition, recipients, channels, template, enabled), most recently changed first, with an enabled filter and name search, 50 per page (page). Any signed-in role. Read-only.
notificationRules.togglewritesTurns a notification rule (id) on or off via enabled. Owner only. Changes data. Mutation — changes data.
notificationRules.triggerwritesconfirmManually fire a notification rule right now — sends the rule's real notification(s) immediately, out of band. Requires confirmation.
notificationRules.updatewritesReplaces all fields of a notification rule (id plus the complete rule definition: name, trigger, condition, room scope, recipient filter, channels email/sms/whatsapp/push, templates). Owner only. Changes data; the email channel requires a subject. Mutation — changes data.
obergrenze
obergrenze.ausnahmeAufhebenwritesRemoves the marking again: the day will be reported again from the next run. Mutation — changes data.
obergrenze.imZeitraumread-onlyChecks the price ceiling for the period from to to (YYYY-MM-DD): on days with more than 50 % of double rooms vacant, the property's own double room price must not exceed the price of the designated comparison property (crawled competitor price). Returns the violations together with the number of days checked, not checkable and decided; if a price is missing, the check stays silent. Any signed-in role. Read-only, does not set prices.
obergrenze.starkeTageread-onlyThe price band on strong days: floor and ceiling at once. Unlike `imZeitraum` (ceiling only, applies when there is a lot of vacancy), this procedure looks in BOTH directions: too cheap means sold out first and profit given away, too expensive means not booked at all. Read-only query.
onboarding
onboarding.dismisswritesMark onboarding as dismissed regardless of step completion. Mutation — changes data.
onboarding.stateread-onlyState of the property's setup checklist: whether calendar source, channel access and invoice sender are set up, how many steps are done, whether everything is complete, and whether the checklist was dismissed. Any signed-in role. Read-only.
orders
orders.listread-onlyList in-stay orders for this tenant, newest-first. Filter by stayId (per-stay folio drill-down) or status (pending/confirmed/delivered/cancelled). Read-only.
orders.listCatalogread-onlyCatalog read — all active items for this tenant, ordered by sortOrder. RLS pins to caller's tenant. Read-only query.
orders.listCatalogByTokenread-onlyPublic-by-token catalog read for the guest portal. Resolves the token → (tenantId, stayId) via `gueltigeGastSitzung`, then runs the actual catalog read inside withSystem(tenantId) with an explicit tenantId filter (Pattern A defense-in-depth). Read-only query.
orders.listOrdersread-onlyList orders for this tenant. Optional filters by stay + status. Newest-first by orderedAt. Read-only query.
orders.placeOrderByTokenwritesPublic-by-token order placement from the guest portal. Token is the auth principal — no session. Resolves (tenantId, stayId), then runs the verify + insert + folio-line side-effect inside withSystem(tenantId) with explicit tenantId filters. Mutation — changes data.
orders.place_orderwritesPlace an in-stay order on behalf of a guest. Verifies the catalog item belongs to this tenant + is active and the stay is this tenant's (else stay_not_found) with an open folio (else folio_closed), inserts the stay_orders row, then writes a folio_lines charge (VAT 19% for in-stay extras). Best-effort: if the folio insert fails the order still exists with folioLineId=NULL.
orders.updateOrderStatuswritesconfirmSet a guest order's status: confirmed / delivered / cancelled. Cancelled is final and cannot be undone; if the order had a folio line, a refund counter-line is booked in the folio. If the folio is already closed then, the call is rejected with folio_closed. Errors: order_not_found, order_cancelled, folio_closed. Requires confirmation.
orders.update_statuswritesconfirmTransition an order to confirmed / delivered / cancelled. Owner-only. Cancellation books one negative 'refund' folio line reversing the order's charge (the original line stays); repeating it is a no-op. A cancelled order cannot change again (order_cancelled). Cancelling an order with a folio charge on a closed folio fails with folio_closed. Confirmation-gated.
orders.upsertCatalogItemwritesCatalog upsert — owner-only. Insert when no id, update otherwise. RLS scoping: update is `eq(id) AND eq(tenantId)` so a cross-tenant id is silently a no-op (Pattern-A silence). Mutation — changes data.
payouts
payouts.detailread-onlyWhat one payout consists of: the guest payments and refunds in it (with stay, room and guest where known), Stripe fees and the reconciliation to the paid-out amount. Payout id from `payouts.list`. Owner only. Read-only.
payouts.listread-onlyStripe payouts of direct bookings to the property's bank account, newest first (amount, status, arrival date). `connected: false` if no Stripe account is linked. Paginate with `cursor` = `nextCursor`. Owner only. Read-only — moves no money.
plan
plan.entitlementsread-onlyThe caller's plan entitlements — the client's source of truth for showing feature UI vs. an upsell. RLS-scoped tier read; permissive when tiers are off or the tenant has no tier yet (mirrors the server-side gate). Read-only query.
preiskalender
preiskalender.imZeitraumread-onlyPrice calendar for the period from to to (YYYY-MM-DD; from must not be after to): per day, occupancy, the set price per room type, the stored price suggestion with the gap to it, neighboring prices, own crawled competitor price and market position (unter, im, über). Also, for the "Markt" view: occupied rooms, the set double-room price and the current price at Booking level, the median of the budget group with a hint per night, and the price of every other hotel (`haeuser`, `preiseJeHaus`). Owner only. Read-only, does not set prices.
preiskalender.jahresbandread-onlyTwelve month tiles starting from the current month: the map above the month view. No input: the window is always "current month + 11", there is nothing to configure (see JAHRESBAND_MONATE, justified against the measured 388-day horizon of the crawled competitor prices). Read-only query.
preisstrategie
preisstrategie.budgetGruppeSetzenwritesSets the budget group — the other properties this property compares its prices with directly: pass `hotelUrls` (addresses from `preisstrategie.lesen` → `referenzKandidaten`; an empty list = no group). Their median appears as its own column in the price calendar ("Market" view), calculated by the same market rules (without placeholders, with "only downwards"). Does not delete or set any prices. Owner only. Mutation — changes data.
preisstrategie.lesenread-onlyReturns the adjustable values of the price derivation (factor for triple rooms, threshold and discounts for single rooms), the fixed minimum gap, the reference property together with selectable candidates, and example calculations. Any signed-in role. Read-only.
preisstrategie.nurNachUntenSetzenwritesDetermines which other properties count in the market median only if they lower it: pass `hotelUrls` (addresses from `preisstrategie.lesen` → `referenzKandidaten`; an empty list = all count normally). A property marked this way drops out on every day on which it is above the middle of the rest, and keeps counting on days below it — identically for the price calendar, suggestions, high-price days, price ceiling, remaining list and event premium. Does not delete or set any prices. Owner only. Mutation — changes data.
preisstrategie.referenzhausSetzenwritesSet or clear the reference hotel for price suggestions: pass `hotelUrl` (a competitor URL Foyer already collects prices for — see `preisstrategie.lesen` → `referenzKandidaten`) or null. It is the ceiling while a night is not booking well (high-price days on target or too slow against the booking-pace curve; normal nights with more than half the double rooms free): more than 5 % above it, the nightly run proposes a reduction towards it (≤10 % per step). Sets NO prices — suggestions wait for approval.
preisstrategie.speichernwritesSaves the rule by which single and triple room prices are derived from the double room price (dreierFaktor 1 to 3, einzelSchwelleCents, einzelAbschlagUnterCents, einzelAbschlagAbCents) and returns the new state with examples. Owner only. Changes the rule but does not set any prices itself. Mutation — changes data.
properties
properties.byUuidread-onlyDetail view of a property by propertyUuid: name, photo, address, assigned room with maintenance status, capacities, amenities, price overview (lowest, highest and average price, next free day), house rules and upcoming reservations. Requires the properties module. Read-only; an unknown UUID returns NOT_FOUND.
properties.getread-onlyFetch a single property's detail by its Hospitable property UUID (core fields, mapped local room, capacities, amenities, price/availability summary, house rules, upcoming reservations). DRY: delegates to getPropertyByUuid() (same as tRPC properties.byUuid).
properties.korrekturLoeschenwritesconfirmDelete a correction ('back to Hospitable') and immediately re-notify the staydb with the reverted block. Can make the sent object poorer than the current correction. Requires confirmation.
properties.korrekturSetzenwritesconfirmSet (or replace) a top-level correction for an objekt block field and immediately notify the staydb (POST /webhook/prop) if the resulting block still passes completeness. Requires confirmation.
properties.objektbestandread-only"Was die staydb bekommt" (what staydb receives): the property view from the inventory, explicitly NOT the listing view of `byUuid`. Read-only query.
rabattcodes
rabattcodes.aendernwritesChanges a discount code (id) with all fields (code, art, wert, limits, aktiv). Without an actual change nothing is written (geaendert=false); otherwise an audit log entry is created with the value before and after. Owner only. Changes data. Mutation — changes data.
rabattcodes.anlegenwritesCreates a discount code for the direct booking page: code, art (prozent or betrag), wert, optionally minNaechte, stay and booking period, maxEinloesungen, aktiv. The code is normalized; a code that is already taken returns CONFLICT. Owner only. Changes data and writes an audit log entry. Mutation — changes data.
rabattcodes.listeread-onlyAll codes of the property with redemptions x/max, newest first. Read-only query.
rabattcodes.loeschenwritesconfirmDelete a discount code that has NEVER been used (no redemption, no pending Stripe checkout). A used code cannot be deleted — deactivate it with rabattcodes.setzeAktiv instead. Irreversible. Requires confirmation.
rabattcodes.setzeAktivwritesDeactivate (and reactivate again) — the way to handle codes that have been used. Mutation — changes data.
rate-plans
rate-plans.listread-onlyList all rate plans for the tenant. Returns id, name, isDefault, priority, refundable, cancellationWindowHours, minLeadTimeHours, maxLeadTimeDays, guestSegment, and inheritFromId. Ordered by priority then name.
rate-suggestions
rate-suggestions.actwritesconfirmAct on a rate suggestion: 'accepted' writes the suggested (or override) price into room_rates for that room-type/date, 'rejected' dismisses it, 'override' records a custom price. Writes pricing — requires confirmation.
rate-suggestions.get_auto_moderead-onlyRead the current rate_suggestion_auto_mode setting for the tenant. Returns 'off' (no automation), 'suggest' (daily suggestions for operator review), or 'auto' (daily suggestions + auto-apply within ±20% guard). Read-only. Rate suggestions include a losHint field ({ minStay: number } | null) set when occupancy >= 75%; auto-mode writes minStay to rate_restrictions automatically.
rate-suggestions.get_benchmarkread-onlyGet anonymous cross-tenant benchmark rates for a specific date (p25/p50/p75 in cents). Returns null if fewer than 5 tenants are in the cohort (k-anonymity threshold). The cohort is determined by the tenant's country and room-count size band ('5-15' | '16-30' | '31-60' | '60+'). Data is refreshed daily at 03:00 UTC.
rate-suggestions.get_benchmark_opt_inread-onlyGet the current tenant's benchmark opt-in status. When enabled, this tenant's room_rates contribute to the anonymous cross-tenant benchmark pool. Returns { enabled: boolean }.
rate-suggestions.listread-onlyList AI-generated nightly rate suggestions in a date range — each with the suggested and current price (cents), a rationale, the LOS hint, and whether it was already acted on (accepted/rejected/override). Read-only.
rate-suggestions.set_auto_modewritesconfirmUpdate the rate_suggestion_auto_mode setting for the tenant. 'off' disables automation; 'suggest' enables daily generation of rate suggestions for operator review; 'auto' additionally applies suggestions that fall within the ±20% guard automatically. Requires confirmation.
rate-suggestions.set_benchmark_opt_inwritesconfirmEnable or disable this tenant's participation in the anonymous rate benchmark pool. When enabled, the tenant's room_rates feed the aggregated benchmark that all opted-in tenants in the same country + size band can see. The benchmark only surfaces when >= 5 tenants are in the cohort. Requires confirmation.
rateSuggestions
rateSuggestions.generatewritesCalculates price suggestions for a rate plan (ratePlanId) and a date range from to to (optionally only one roomType), stores them as suggestions and returns them together with the number of skipped days and the reasons. Does not set any prices itself. Owner only, with the revenue_ai feature package; a rate plan belonging to another property returns NOT_FOUND. Mutation — changes data.
rates
rates.blockRoomDateswritesBlock a (room, date) range. Idempotent per (tenant, room, date) unique key. One row per night via ON CONFLICT DO NOTHING. Mutation — changes data.
rates.block_dateswritesconfirmBlock a date range for a unit (room id) so it cannot be booked — e.g. maintenance or owner use. Inserts the blocked nights (idempotent) and best-effort closes the dates on connected OTA channels. Dates are YYYY-MM-DD inclusive. Requires confirmation.
rates.bulk_setwritesSet the same price across a date range for a given room type. Inserts or updates one row per night between dateFrom and dateTo (inclusive). Uses the tenant's default rate plan when ratePlanId is omitted. Returns the count of rows inserted/updated.
rates.createPlanwritesCreate a new rate plan. The name is auto-translated for the booking page; optional namenUebersetzt {de?, en?} sets a language by hand.
rates.deletewritesDelete a specific room rate by its UUID. Returns the deleted rate's id.
rates.deletePlanwritesconfirmDelete an existing rate plan.
rates.deleteRestrictionwritesconfirmDelete a stay-length/date rate restriction.
rates.listread-onlyList room rates for a date range. Optional filters: roomType and ratePlanId (defaults to the tenant's default rate plan if omitted). Returns one row per (roomType, date) with priceCents and currency.
rates.listBlockedDatesread-onlyList operator-managed blocked-date entries in a window. Joined with the room scope so the UI can show per-room blocks (e.g. "DZ-12 on 2026-06-14: Renovierung"). Read-only query.
rates.listBulkEditsread-onlyAudit-log of bulk-edits (rates + restrictions). Read-only; rows are written by bulkSet.
rates.listChannelSyncread-onlyoutbound channel-sync log for the operator's audit surface. Read-only; entries are written by the channel-sync workers (the former hospitable.rate-sync rows stay as history).
rates.listPlansread-onlyList the property's rate plans.
rates.list_restrictionsread-onlyList min-stay / max-stay restrictions for a date range. Optional ratePlanId filter (defaults to tenant's default plan). Returns one row per (roomType, date) with stopSell, cta, ctd, minStay, maxStay flags.
rates.manualResyncwritesmanual resync — re-emits the OTA channel rate-sync job for the given range without changing prices. Recovery from a failed channel-sync run. Mutation — changes data.
rates.pushPricewritesMakes the price set in the calendar effective for THIS ONE ROOM. Mutation — changes data.
rates.richtwertSetzenwritesconfirmSet nightly prices from the DOUBLE-ROOM price per day: pass `tage` as [{ datum: 'YYYY-MM-DD', doppelzimmerCents }]. Single, triple and shared-bath room types are derived by the property's pricing rule (Einstellungen → Preisstrategie); rooms with their own price row are set room-exact. Every price is pushed to Beds24 (Booking.com/Airbnb) immediately, logged and undoable like the rate calendar. Changes live selling prices — requires confirmation.
rates.unblockDateswritesUnblock by id. Returns count of removed rows. Mutation — changes data.
rates.undoBulkEditwritesundo a bulk-edit by restoring old prices from diffJson. New rows (oldPriceCents === null) are deleted; existing rows have their price restored. Marks the audit row with revertedAt. Mutation — changes data.
rates.unit-calendarread-onlyPer-unit nightly PRICES for a date window, from Foyer's own price per room (`room_rates`). Returns room (unit code), date, priceCents, currency, minNights, and beds24PriceCents (only when Beds24 sells a different price — price floor per room type / 650 EUR cap). At most 400 nights per window. Says NOTHING about whether a night is free — bookings and blocks are not considered; use `availability.query` for that. Read-only.
rates.updatePlanwritesEdit an existing rate plan. Renaming re-translates the booking-page name; calling with just id fills missing languages. namenUebersetzt {"en": "..."} sets the English guest-facing name by hand, {"en": ""} returns it to automatic.
rates.upsertwritesSet the price for a specific room type on a specific date. Creates the row if it does not exist, or updates priceCents and currency if it does. Uses the tenant's default rate plan when ratePlanId is omitted.
rates.upsertRestrictionwritesSets or replaces a day's restrictions for a room type (roomType, date): stopSell, closed to arrival and closed to departure (cta, ctd), minStay and maxStay; if ratePlanId is omitted, the default rate plan applies. Triggers the sync with the connected channels. Owner only. Changes data; a minStay greater than maxStay is rejected. Mutation — changes data.
rechnungsabsender
rechnungsabsender.setzenwritesSelects the sender of invoice emails: modus foyer, eigene_domain (then with adresse) or eigenes_postfach. Owner only. Changes the property's setting; nothing is sent. Mutation — changes data.
rechnungsabsender.standread-onlyReturns the sender address from which invoice emails go out: the selected setting (foyer, eigene_domain or eigenes_postfach, or none yet), the route actually in effect, the resulting sender line, and what the selection still lacks. Owner only. Read-only.
registration-settings
registration-settings.getread-onlyRead the current tenant's guest-registration (Meldeschein) policy. Fields: registrationPolicy (auto = derive from the hotel's country, e.g. DE since BEG IV 2025 = foreign guests only | all_guests | foreign_only | none), registrationKurort (spa/health-resort flag — keeps the duty for ALL guests, only effective for DE tenants on 'auto'), idUploadMode (always | when_required | never — gates the ID-upload section in portal layout v2), country (ISO-2 hotel country) and effectiveRequirement (the live-resolved requirement the guest portal enforces). Read-only.
registration-settings.updatewritesUpdate the tenant's guest-registration (Meldeschein) policy. `registrationPolicy` overrides the country default: auto (recommended — derive from the hotel's country), all_guests, foreign_only or none. `registrationKurort` marks a spa/health-resort with visitor's tax (keeps the duty for ALL guests; only effective for DE tenants on 'auto'). `idUploadMode` gates the ID-upload section in portal layout v2: always, when_required (only when a Meldeschein is required for the guest) or never. Retention/deletion of already collected registration data always follows the country's law, regardless of this policy. Owner-only.
reinigung
reinigung.widerrufeZugangwritesRevokes an access. The slot remains, the link is dead. Mutation — changes data.
reinigung.zugaengeread-onlyAll cleaning slots with their active accesses. Read-only query.
reports
reports.buchungenPreiseread-onlyBookings and prices: per booking and room, nights, booking date, paid average price per night, and the calendar price on the booking date together with the difference. Read-only query.
reports.revenue_statsread-onlyRevenue + occupancy KPIs over a 7/30/90-day window: occupancy %, ADR, RevPAR, total revenue (cents), a daily revenue series, and a per-room-type breakdown. Read-only. Revenue is sourced from folio_lines (Foyer-native authoritative). stornoErloese = cancellations where the channel kept money (count + cents): the amount the guest paid according to the channel, GROSS like the rest of revenue (Airbnb: Beds24 Channel Collect + channel commission, capped at the reported price; Booking.com: reported payment, else cancellation fee, without commission — Booking.com bills it separately), the fee itself carries 0% VAT (non-taxable damages) — NOT the payout. Assigned by check-in date and NOT included in revenue, ADR, RevPAR or occupancy. stornogebuehrImUmsatzCents = cancellation fees of LIVE stays (one room of a multi-room booking cancelled): included in revenueTotal and the daily series, but subtracted from the ADR/RevPAR numerator (overall and per room type) — a fee is not a sold room.
reports.summaryread-onlyReport overview of the property: bookings and occupancy per month, booking sources, AI shifts, send counters of the messaging rules, and cleaning tasks (total and completed). Requires the finances module. Read-only.
restliste
restliste.teureTageOhneErklaerungread-onlyWork list of expensive days without a known event: from the competitor prices in the period from to to (YYYY-MM-DD), the days that are significantly more expensive without a trade fair, holiday, bridge day or carnival in the region explaining it, with the threshold and the number of days considered. A reversed period returns BAD_REQUEST. Any signed-in role. Read-only.
review-requests
review-requests.listread-onlyList review requests sent for this tenant. Returns stayId, channel, status, sentAt.
reviews
reviews.antwortenwritesReply publicly. THE CHECK COMES BEFORE SENDING, not after: whatever goes out here stays permanently on Airbnb or Booking.com, and Hospitable does not allow it to be changed afterwards. `darfAntworten()` decides; the error code is passed to the UI unchanged so that it can say WHAT the cause was. Mutation — changes data.
reviews.antwortentwurfwritesDraft reply to a review that has no reply yet, in the language of the review, polite, without making commitments. Draft only: nothing is published or stored. For Beds24 reviews, the reply is sent manually in the extranet (link in the response). Without `MISTRAL_API_KEY` (Mistral, EU), or if the service fails, `quelle: "vorlage"` returns a fixed template. Mutation — changes data.
reviews.gastbewertungSchreibenwritesWrite and submit a guest review. FINAL AND PUBLIC, and unlike a reply it affects a PERSON: afterwards the text appears under the guest's name, and all 55 already sent have `is_editable_on_platform: false`. Mutation — changes data.
reviews.gastbewertungenOffenread-onlyThe open guest reviews: what the property CAN write about its guests. LIVE FROM HOSPITABLE, not from a mirror table: an open guest review only exists while the platform's window is open. A nightly sync would be wrong exactly where the deadline matters. Read-only query.
reviews.kritikread-onlyPoints of criticism: average rating per platform, the number of poor reviews, and the most frequent topics from their texts. Read-only query.
reviews.offeneread-onlyThe open reviews, most recent first, WITH the true totals. OPEN means: no public reply yet. An expired review stays listed anyway IF it has text, because it explains a poor rating even when it can no longer be answered. Read-only query.
reviews.zimmerMaengelread-onlyDefects of ONE room as a short list, condensed from the reviews in the date range. Reads all reviews of the room that contain criticism, including good ones with a negative part, the most recent 15, without names and dates. Result cached for 24 h. Without a key, or on an error: empty list, and `quelle` says why. One room per call so that a call stays small (Mistral, EU). Read-only query.
ring
ring.connection.deletewritesconfirmDelete a Ring connection by id. Tenant-scoped. Cascade-deletes its doorbells.
ring.connection.upsertwritesconfirmCreate or update a Ring account connection. `ringType` is 'mock' (placeholder) or 'ring' (real cloud). `credentials.refreshToken` is stored encrypted. Pass `id` to update, omit to insert.
ring.doorbell.deletewritesconfirmDelete a Ring doorbell by id. Tenant-scoped.
ring.doorbell.upsertwritesconfirmCreate or update a Ring doorbell behind a connection. `deviceId` is the Ring camera id. Pass `id` to update, omit to insert.
ring.healthread-onlyHealth of the front-door Ring doorbell: online, battery, Wi-Fi signal, firmware. `null` if no doorbell camera is set up or the snap service does not answer. Owner only. Read-only.
ring.listread-onlyList Ring doorbells for this tenant (id, name, location, active). Credentials and device ids are NOT returned — view/edit via the operator settings UI.
ring.snapshotwritesconfirmCurrent still image of one Ring doorbell (long side 1568 px). Doorbell ids from `ring.list`. Owner only, logged. Surveillance image: fetch only for a concrete operational reason. Requires confirmation.
ring.test_connectionread-onlyTest a stored Ring connection: reachable or not, and which doorbells it sees. Connection ids from `ring.list`. Returns no credentials. Owner only. Read-only.
security-access-log
security-access-log.listread-onlyList recent camera access-audit entries (who viewed which camera when) for this tenant, newest first. Owner-only.
security-cameras
security-cameras.camera.deletewritesconfirmDelete a camera by id. Tenant-scoped.
security-cameras.camera.upsertwritesconfirmCreate or update a camera behind a connection. `streamId` is the go2rtc source name. Pass `id` to update, omit to insert.
security-cameras.connection.deletewritesconfirmDelete a go2rtc connection by id. Tenant-scoped. Cascade-deletes the cameras behind it.
security-cameras.connection.upsertwritesconfirmCreate or update a go2rtc connection (the property's camera gateway). Pass `id` to update, omit to insert. `credentials` (optional username/password/token) is stored encrypted.
security-cameras.listread-onlyList security cameras for this tenant (id, name, location, active). Credentials and stream ids are NOT returned — view/edit via the operator settings UI.
security-cameras.snapshotwritesconfirmCurrent still image of one security camera (long side 1568 px) — e.g. to check who is at the entrance. Camera ids from `security-cameras.list`. Owner only; every call is logged in the camera access log. Surveillance image: fetch only for a concrete operational reason. Requires confirmation.
security-cameras.test_connectionread-onlyTest a stored camera connection (go2rtc): reachable or not, and which stream names it offers. Connection ids from `security-cameras.list`. Returns no credentials. Owner only. Read-only.
security-events
security-events.listread-onlyList recent security events (Ring doorbell ding / motion) for this tenant, newest first.
smart-locks
smart-locks.deletewritesconfirmDelete a smart-lock assignment by id. Tenant-scoped: only locks owned by the current tenant can be deleted. Cascade-deletes any access_codes rows for that lock.
smart-locks.doorsread-onlyList the tenant's configured doors (id, name, provider, enabled). Use a door's id with smart-locks.unlock.
smart-locks.listread-onlyList smart-lock assignments for this tenant. Returns per-room lock metadata (type, label, active). Credentials are NOT returned by this tool — use the operator settings UI to edit them.
smart-locks.unlockwritesconfirmOpen one of the tenant's configured doors now (any provider — Nuki Web API, TTLock Cloud, Tedee API). Pass doorId (see smart-locks.doors) or omit it to open the default door. Audit-logged.
smart-locks.upsertwritesconfirmCreate or update a smart-lock assignment for a room. Pass `id` to update an existing lock, or omit it to insert (unique per tenant+room — upsert on conflict).
smartLocks
smartLocks.batterienread-onlyOpen Nuki device tasks (battery `aufgaben`, faulty door `stoerungen`) AND the logs of the most recent runs. Does NOT call Nuki live, so the handover and smart locks pages stay fast. Any staff member. Read-only query.
smartLocks.batterienPruefenwritesBatterie-Abgleich jetzt statt erst um 06:15 ausfuehren. Owner-only (schreibt Aufgaben). Mutation — changes data.
smartLocks.doors.createwritesAdd a door. Provider account must exist. Owner-only. Mutation — changes data.
smartLocks.doors.deletewritesconfirmDelete a door mapping from the smart-lock registry. Refused (`gaeste_codes_aktiv`) while the door still carries live personal guest codes — delete or let them expire first; `takt_laeuft` (CONFLICT) while Foyer's guest-code run is working — retry in a moment.
smartLocks.doors.listread-onlyAll doors, default-door order (position, createdAt). Any staff. Read-only query.
smartLocks.doors.listProviderLockswritesList the provider account's locks (setup "Schlösser laden" (load locks)). Owner-only. Mutation — changes data.
smartLocks.doors.updatewritesRename / enable / reorder a door. Owner-only. Mutation — changes data.
smartLocks.haustuerCodeAnzeigenwritesconfirmReveal the code value of ONE keypad-code entry (Nuki type 13) at the front door, read live from Nuki. The code is a house key: it is never stored in Foyer, but every call is audit-logged (door.code_shown: who, when, door, authId). Only entries whose `erlaubt.anzeigen` is true. Owner only. Requires confirmation.
smartLocks.haustuerCodeVorschauread-onlyPreview of a front-door code rotation: which Nuki entry is the current guest code, until when the old code stays valid, how many stays may already have it. Changes nothing. Owner only.
smartLocks.haustuerCodeWechselnwritesconfirmRotate the guests' front-door keypad code: creates a new random code at Nuki, waits for Nuki to confirm (up to ~3 min), THEN switches guest messages and the arrival guide to it; the old code stays valid until the affected guests have left. Returns the new code in plaintext once. On `rueckleseprobe_zeitueberschreitung` (Nuki did not confirm in time) the result is `fehlgeschlagen` with `authName`: the shared code stays the OLD one, but an unconfirmed entry with that name may remain at Nuki — tell the owner to check the Nuki app (Authorizations) for an entry named exactly `authName` and delete it if present. Never relay or guess a code. Physical security: a wrong rotation can lock guests out. Owner only, audit-logged. Requires confirmation.
smartLocks.haustuerZugangread-onlyWho has access to the front door: every Nuki authorization of each active Nuki door, read LIVE from Nuki (≤ 60 s cache). Contains the names of Nuki app users (personal data, live only — Foyer does not store them) but never a code value. Each entry carries `erlaubt` — which actions the protection rules allow (show code, edit name/code/active, delete), `grund` when something is locked (gaestecode_geschuetzt, foyer_gaeste_code = a personal per-booking guest code managed by Foyer: show only, manage it via the booking; schonfrist_laeuft, nuki_beschaeftigt, geraet; zeitfenster_eintrag = the entry carries a time window set in the Nuki app: edit name/code/active is not allowed, only viewing and deleting). An existing time window (`vonTag`/`bisTag`) is shown read-only: Foyer does not write time windows and does not write to entries that have one. Owner only.
smartLocks.haustuerZugangBearbeitenwritesconfirmEdit a Nuki authorization at the front door. An entry that carries a time window (set in the Nuki app) is NOT editable here — name, code and active are rejected with `zeitfenster_eintrag` (Foyer would have to write the window back, which Nuki drops or hides); change it in the Nuki app, deleting works. Foyer does NOT write time windows (decision 2026-10-05, Nuki drops them): a `zeitfenster` that differs from the entry's current window is rejected with `zeitfenster_nicht_verfuegbar` — do not send it; windows can only be set in the Nuki app. Fields: name (1–32 chars), code (keypad codes only: 6 digits 1–9, not starting with 12, not trivial, not used by another entry) and active/inactive. Send only the fields to change; code-change names (“Foyer Gäste <digit>…”, older “Foyer Gäste ab …”) are reserved. The current guest code and old codes in their grace period are protected (rename only). Waits for Nuki to confirm EVERY field (up to ~3 min); `gespeichert` only after the read-back. If Nuki drops the time window (entry would be unlimited) Foyer deactivates the entry and creates an urgent task (`zeitfenster_verworfen_deaktiviert`). If Nuki does not confirm in time, Foyer re-checks after ~10 min (`unbestaetigt_nachpruefung_geplant`). `gespeichert` may carry `hinweis: zeitfenster_verworfen_inaktiv` — the entry is inactive but Nuki dropped its existing time window; tell the owner. ACTIVATING an entry without a time window requires `unbegrenztBestaetigt: true` — the code then applies WITHOUT time limit; ask the owner explicitly before setting it (otherwise `aktivierung_ohne_zeitfenster`). An entry whose window has expired (`zeitfenster_abgelaufen`) can only be deactivated or deleted here. Owner only, audit-logged. Requires confirmation.
smartLocks.haustuerZugangLoeschenwritesconfirmDelete a Nuki authorization at the front door. Not possible for the current guest code, old codes in their grace period, or the bridge/keypad devices. Deleting an APP entry (typ `app`) means that person can no longer open the door with the Nuki app — say so when asking for confirmation. Waits for Nuki to confirm the entry is gone (up to ~3 min). Owner only, audit-logged. Requires confirmation.
smartLocks.listActiveCodesread-onlyLists a stay's (stayId) active (not revoked) door codes with lock ID, code in plain text, and validity period. Operations roles only (owner, staff, reception). Read-only.
smartLocks.nukiGetConfigread-onlyOwner config view (never returns the token — only its hint). Read-only query.
smartLocks.tedeeGetConfigread-onlyOwner config view (never returns the PAK — only its hint). Read-only query.
smartLocks.ttlockGetConfigread-onlyOwner config view (never returns credentials — only the hint). Read-only query.
smartLocks.unlockErgebnisread-onlyDid Nuki confirm the opening triggered by this click? (B2) `offen` = no result yet (the job runs ~10 s after the click). Like `unlock`: requires the smart_locks module and an operator role (owner/staff/reception); reads via `withSystem`. Read-only query.
stayAccess
stayAccess.clearOverridewritesconfirmClear an assistant access-code override for a stay.
stayAccess.getResolvedread-onlyReturns the resolved access info for a stay (override > extracted > tenant default). Join chain (corrected — no propertyUuid): stays.externalRef = hospitablePropertyReservations.exReservationId hospitablePropertyReservations.exPropertyId = hospitableProperties.exId Every query carries explicit tenant fence (eq(table.tenantId, ctx.tenantId)). Read-only query.
stayAccess.setOverridewritesSet an assistant access-code override for a stay.
stays
stays.aenderungenread-onlyThe change history of ONE booking: who touched which field and when. Read-only query.
stays.anfrageZimmerread-onlyIs the room of an open request now occupied, and which room of the same category would be free for the whole period? `null` if the stay is not an open request. `gleicherPreis` per room: the same room prices on every night and in every rate plan. Operations roles only. Read-only query.
stays.anreisenOhneTelefonread-onlyBooking.com arrivals from today to the day after tomorrow without a phone number, each with a link to the booking's extranet page. Since 28 Sep 2026 Booking.com no longer passes the number on to Beds24; without it the WhatsApp template of the check-in instructions cannot reach the guest. Operations roles only (names); others get an empty list. Read-only query.
stays.aufEinenBlickread-onlyThe booking at a glance for the head of the thread: summary, the figures paid, on site, arrival and check-in from, open items with a jump target and at most one contradiction notice — texts as keys with values. Once the arrival is confirmed, also `aufenthalt`: one point per night up to check-out, with the messages and requests of each day and the check-out reminder. Operator roles only, otherwise `null`. Read-only query.
stays.booking-panelread-onlyRead-only assembly of a booking's two inbox side-panels: reservation summary, guest, mapped property (address/rules/capacity), host+guest financial breakdown, messaging activity, and linked tasks. Returns null if the stay does not exist. Read-only.
stays.byIdread-onlyGet full detail for a single stay/reservation by id.
stays.cancel_and_refundwritesconfirmCancel a DIRECT (Stripe) booking and refund per the cancellation-window policy. forceRefund=true issues an operator courtesy refund of the FULL amount paid regardless of the window. Only direct bookings with a payment can be refunded here. Bookings made with booking terms (stays.stornoVorschlag → hatSchnappschuss=true) refund ONLY the amount passed as erstattungCents (cents, 0 = deliberately no refund, at most the amount paid — call stays.stornoVorschlag FIRST and pass its vorschlagCents or deviate deliberately). If such a booking was paid via Stripe and its proposal is above 0, omitting both erstattungCents and forceRefund is REFUSED (PRECONDITION_FAILED, message starts with 'erstattungsbetrag_erforderlich:<vorschlagCents>:') and nothing changes. Owner-only, IRREVERSIBLE, requires confirmation.
stays.cardDetailread-onlyRich payload for the calendar booking quick-card. Joins the guest's contact details and returns the OTA financials + headcount so the card can mirror Hospitable's reservation card (confirmation code, arrival/ departure times, nights, price, guest breakdown, contact). Lazily fetched when a bar is clicked — keeps `forWindow` lightweight. Read-only query.
stays.checkoutZuruecknehmbarread-onlyCan an automatic check-out (departure message, announced early departure, accepted suggestion) be undone? Read-only query.
stays.checkoutZuruecknehmenwrites“Check back in”: undoes an automatic check-out. Mutation — changes data.
stays.codeUebergebenwritesMark that reception handed the guest the front-door code in person — for bookings without a contact channel. Counts as the goal station “code delivered”. Set once; a second call does not change the timestamp; no undo, the change log records who and when. Rejected for cancelled stays and when access is blocked. Mutation — changes data.
stays.createWalkInwritesCreate a walk-in booking directly (no OTA) — for a guest arriving without a prior reservation.
stays.create_bookingwritesconfirmCreate a booking: inserts a guest and a stay. Dates are YYYY-MM-DD; checkout must be after check-in. If status='checked_in', the smart-lock check-in lifecycle fires. Requires confirmation.
stays.forWindowread-onlyList stays overlapping a given date window, for calendar/occupancy-style views.
stays.gastAngabeSetzenwritesSet the guest's country and/or language by hand, in "Über den Gast" (About the guest). Per field: omitted = unchanged, `null` = back to "automatic", a code = set. Country: `guests.land_von_hand`, takes precedence over registration form, booking and dialling code. Language: writes `guests.locale` (portal, templates and reminders follow it) AND `sprache_von_hand_am`, which blocks the imports; "automatic" only clears the timestamp, `locale` stays. Attached to the stay's GUEST. Trace in audit_log. Mutation — changes data.
stays.gastAuswertungWiderspruchwritesThe guest objects to the analysis of their messages for improving Foyer (Art. 21 GDPR; DPA Annex 3 para. 8). Their messages no longer enter the review set, and existing excerpts are deleted immediately. `aufheben: true` withdraws an objection entered by mistake. Mutation — changes data.
stays.gastEmailUebernehmenwritesAdopt an email address from a guest message, like `gastTelefonUebernehmen`: one click below the message, never automatic; only what the detection finds in THIS incoming message itself is adopted. The address becomes the valid one; the previous one is kept in `weitere_email`. Mutation — changes data.
stays.gastInforead-onlyThe "Über den Gast" (About the guest) panel: country, language, WhatsApp, reported problems, stated arrival time, each with its source, so that a guess (dialing code, detected language) does not look like a stated fact. Also "online check-in stuck": an error in the guest portal or an online check-in that was started but not finished, otherwise `null`. Read-only query.
stays.gastKontaktSetzenwritesManually enter the guest's email address or phone number, directly in "Über den Gast" (About the guest). The new value becomes the VALID one: invoice, portal link and rule emails go there, and WhatsApp to the number. The previous one (usually the channel's forwarding address, e.g. `…@guest.booking.com`) is kept in `weitere_email` / `weitere_telefon`. A national number ("06 12345678") is interpreted by the rule of the guest's country (`inlandsnummerZuE164`, around 30 countries; unknown… Mutation — changes data.
stays.gastNotizSetzenwritesNote about the guest across bookings, e.g. "ruhiges Zimmer gewünscht" (quiet room requested), "hat Schimmel gemeldet" (reported mold). Attached to the stay's GUEST; every future booking shows it. Empty text deletes it. Trace in audit_log. Mutation — changes data.
stays.gastTelefonUebernehmenwritesAdopt a phone number from a guest message as the WhatsApp number (2026-10-10, after Booking.com stopped providing phone numbers on 2026-09-28): the guest writes it in the chat, the operator adopts it with one click. Writes `guests.canonical_phone`, the same place and normalization as the guest portal; the sender finds it afterwards (no more `kein_telefon`) — and since 2026-11-13 it also records the guest's WhatsApp consent. Only what the detection finds in THIS incoming message itself is adopted… Mutation — changes data.
stays.getread-onlyFetch a single stay with its guest details and a summary of the linked conversation (message count, last-message timestamp, conversation id). Read-only.
stays.listread-onlyList stays/reservations, optionally filtered (date range, guest, status).
stays.list_activeread-onlyList stays whose check_out is today or later. Includes pending and confirmed. Read-only.
stays.list_for_guestread-onlyList other stays of a single guest at this tenant, newest-first. excludeStayId is the current stay (so a returning-guest prompt can skip the active visit and focus on history). Read-only.
stays.perform_checkoutwritesconfirmCheck out a stay: sets status → checked_out, emits the stay.checked_out webhook, nudges the channel availability sync (Beds24/Hospitable) so freed nights reopen, schedules the post-stay review request, and revokes any smart-lock codes. Idempotent if already checked out. Requires confirmation.
stays.prior_staysread-onlyList a guest's prior stays, newest-first. Optionally exclude a stayId (the current one). Read-only.
stays.problemErledigtwrites"Mark as resolved" in the guest panel: closes everything the guest has reported so far, every category — the review request can go out again, and the red badge becomes the grey line "resolved by <staff member>". A later new problem counts again. Operator roles only. Mutation — changes data.
stays.problemWiederOeffnenwritesReverts a resolution made via the button or by the AI — the problem counts as open again. A resolution the guest reported themselves with a short phrase stays (it is in their message). Mutation — changes data.
stays.protokollread-onlyThe log across ALL bookings: the audit view. Read-only query.
stays.rechnungsFortschrittread-onlyInvoice requests of this booking with the guest message they belong to and their progress in five stages (requested, form sent, billing details filled in, invoice created, invoice sent). Also recognised guest invoice requests without a request of their own (`anfrageId: null`) and requests without a matching guest message (`messageId: null`). Operator roles only, otherwise empty. Read-only query.
stays.rechnungsVerlaufread-onlyHistory of the invoice request for the left panel. Read-only query.
stays.reset-all-room-overrideswritesconfirmClear ALL room-swap overrides for this tenant, restoring every swapped booking to its originally booked room(s). Swaps whose booked room is occupied by another guest stay in place (counted in `behalten`). Owner-only, IRREVERSIBLE, requires confirmation.
stays.reset-room-overridewritesClear a single booking's room-swap override, restoring its originally booked room(s). Fails with room_occupied:<room>:<free room>:<guest> when another guest occupies the booked room in that period; pass allowConflict: true only to double-book deliberately.
stays.schnelltextwritesText snippet for the reply field: invoice link, late check-out, access details. Sends NOTHING; the text goes into the input field. Operations roles only: "zugang" (access) carries codes (viewing is logged). Mutation — changes data.
stays.set-room-overridewritesManually swap a booking's room (guest wish, maintenance issue, …). fromRoom must be one of the booking's current effective rooms; toRoom must exist and be free for the stay's dates (considering other bookings' own overrides) unless allowConflict is set — then the room is DELIBERATELY double-occupied. fromRoom === toRoom clears that mapping.
stays.stornoVorschlagread-onlyWhat would the guest get back if the booking is cancelled NOW? With a snapshot (`stays.buchungsbedingungen`): tiered by the terms that applied at booking time, accommodation tax refunded in full. Without a snapshot: the old deadline rule, exactly as `cancelAndRefund` applies it. Read-only; the suggestion moves no money, it pre-fills the amount in the cancellation dialog.
stays.todayread-onlyList stays that are arriving, departing, or in-house today.
stays.update_dateswritesconfirmMove or extend a booking (new check-in/out dates, optionally a different unit). Only manual/direct bookings without an OTA reservation id are editable — OTA reservations are owned by the channel and rejected. A CANCELLED stay keeps its dates (stay_cancelled_price_dates_locked). Requires confirmation.
stays.upsellAngeboteread-onlyActive extras (late check-out, early/late check-in …) with their status for this stay: status, paid at, and for open ones where the link stands (sent / in a draft / started in the guest portal). Read-only query.
stays.upsellVorOrtBezahltwritesconfirmMarks an open extra of a stay as paid on site: status paid, the same effect as an online payment (arrival/departure shifted), and service line + payment in the folio. Payment method card (terminal) or cash — cash only with the cash-register function. A still-open Stripe link is closed first; if the guest already paid online, nothing is booked. A second call books nothing twice (`neu: false`). Operator roles. Mutation — changes data.
stays.upsellZahlungslinkwritesPayment link for an extra. Sends NOTHING: the link and text go into the reply field. It is booked only after payment (Connect webhook). Mutation — changes data.
stays.whatsappKontowritesManually set ✓ "hat WhatsApp" (has WhatsApp) / ✗ "kein WhatsApp" (no WhatsApp) / back to open: on opening the WhatsApp link, the operator saw whether the number is registered. Applies to the guest's NUMBER until changed; ✗ holds back the WhatsApp templates, ✓ lifts a ✗. Mutation — changes data.
stays.zurBuchungsnummerread-onlyThe stay for a Booking.com booking number — for the one-click button that hands the phone number from the extranet to Foyer. Guest, room, arrival and the current number for confirmation; `null` = no Booking.com booking with this number. Operations roles only. Read-only query.
taskRules
taskRules.byIdread-onlyReturns a task rule (id) with trigger, time offset, condition, task template and assignment strategy. Any signed-in role. Read-only; an unknown id yields NOT_FOUND.
taskRules.createwritesCreate a new task automation rule.
taskRules.deletewritesconfirmDelete a task automation rule.
taskRules.dryRunwritesDry run of a not-yet-saved task rule: replays its condition over lookbackDays (1 to 90, default 30) against already logged events and reports how often it would have fired, plus up to 10 examples. Owner only. Changes nothing and creates no tasks. Mutation — changes data.
taskRules.executionsread-onlyLists the execution log of a task rule (ruleId): trigger time, result (task_created, condition_false, no_assignee, error …), created task; newest first, 50 per page, dry runs only with includeDryRun. Any signed-in role. Read-only.
taskRules.listread-onlyLists the property's task rules (trigger, time offset, condition, task type, priority, assignment, enabled), most recently changed first, with an enabled filter and name search, 50 per page (page). Any signed-in role. Read-only.
taskRules.togglewritesTurns a task rule (id) on or off via enabled. Owner only. Changes data. Mutation — changes data.
taskRules.triggerwritesconfirmManually fire a task rule right now — creates its real task(s) immediately, out of band. Requires confirmation.
taskRules.updatewritesPartially changes a task rule (id); only the fields passed of the rule definition (name, trigger, time offset, condition, room scope, task type, priority, title and description template, assignment, iCal export) are changed. Owner only. Changes data. Mutation — changes data.
tasks
tasks.addCommentwritesReplies to a task. Mutation — changes data.
tasks.add_photowritesAttach a photo (image/jpeg, image/png, image/webp) to a task as completion evidence. Body is base64-encoded. Stored under the tenant's photo bucket; URL returned for embedding in chat. Max 5 MB per photo.
tasks.assignwritesconfirmReassign a task to a different worker (or unassign by passing null). Mutating action — the MCP client must include _confirm: true.
tasks.byIdread-onlyReturns a task (id) with event history and attachments. Work roles see only their own tasks; an unknown or invisible id yields null instead of an error. Any signed-in role. Read-only.
tasks.calendarGridread-onlyHospitable-style 2D calendar feed: rooms × dates with task pills. UI consumer: /operations/calendar/tasks (Phase 5). Two RLS-scoped SELECTs (rooms, tasks-in-range). Caller buckets by (room.name, dueAt) since `tasks.room` is varchar, not a FK. Read-only query.
tasks.commentsread-onlyReads a task's thread: the return channel to the damage report. The cleaner reports via their link (`reinigung.meldeSchaden`); without these two procedures there would be no reply, only a filing. Read-only query.
tasks.countsread-onlyDashboard tab counts. RLS scopes to current tenant. Buckets: - needsAction: unassigned & open - inProgress: assigned or in_progress - upcoming: open/assigned/in_progress with due_at in next 7d - past: done/cancelled OR overdue active rows. Read-only query.
tasks.createwritesCreate a manual task. Mirrors the operator UI's manual-create form. If assignedToUserId is set, status starts at 'assigned'; otherwise 'open'. Optional dueAt (ISO timestamp with time zone, e.g. 2026-10-21T16:00:00+02:00) sets the due date; without it the task has none and shows under „Heute“ until done.
tasks.getread-onlyGet a single task with its full event timeline and photo/document attachments. Returns null if the task doesn't exist or isn't visible to the key (housekeeping/maintenance-scoped keys see no tasks — keys have no user).
tasks.historySearchread-onlyCross-stay history search. Matches the query against task titles, stay external_code (e.g. Hospitable confirmation code "HM54KEHW5X"), and stay external_ref. Returns the matched tasks plus any task_rule_executions rows linked to those tasks. Default window is the last 90 days. Read-only query.
tasks.listFilteredread-onlyList tasks filtered by status, date, assignee, or kind.
tasks.listForMeread-onlyList tasks assigned to the current (owner) user.
tasks.list_assignable_usersread-onlyList tenant members in the housekeeping or maintenance pools — used as context when picking an assignee for a new task. Read-only.
tasks.list_openread-onlyList tasks not yet completed (open + assigned + in_progress) across the tenant. Newest-first. Read-only.
tasks.list_unassignedread-onlyList open tasks that have no assignee yet. The operator's triage view: what's hanging in the queue. Newest-first. Read-only.
tasks.mark_donewritesMark a task as done. Sets status='done', completed_at=now, emits the task.completed webhook.
tasks.reassignwritesconfirmReassign a task to a different worker. Pass userId=null to move it back to the unassigned pool. Equivalent to tasks.assign — exposed as a separate tool so prompts like 'reassign X to Y' resolve naturally. Mutating action — requires _confirm: true.
tasks.setzeFaelligkeitwritesSets or removes the due date of a task (id). `dueAt` is an ISO timestamp with time zone, or `null` (no due date). Operator roles only; the change is recorded in the audit log (`task.faelligkeit_gesetzt`) with old and new value. Mutation — changes data.
tasks.updateStatuswritesChange a task's status (open / in progress / done / etc.).
tenants
tenants.anreiseFotoHochladenwritesUploads a photo for a step of the arrival guide (Base64) — same storage as the settings page. Returns the `photoKey` (a new key `<step>-<8 hex>.jpg` per upload, downscaled to ≤ 2000 px, metadata removed); then add it as `{ key }` to the step's `fotos` via `tenants.update-arrival-guide-settings` (up to 4 photos). Owner and team, as in the browser. Mutation — changes data.
tenants.connectStatusread-onlyStripe-Connect status for the current tenant. Returns whether the tenant has connected their Stripe account and is onboarded (payouts-enabled). Used by the /direct surface to render the right state (CTA vs connected-summary). Read-only query.
tenants.getArrivalGuideSettingsread-onlyReturns the settings of the guest arrival guide (arrival and access information, Wi-Fi, video links, etc.); an empty object if there is no entry. May contain access credentials. Any signed-in role. Read-only.
tenants.getBookingHotelIdread-onlyThe property's Booking.com hotel ID. With it Foyer links every Booking.com booking without a phone number to its extranet page — since 28 Sep 2026 Booking.com no longer passes the number on to Beds24. `null` = not set. Read-only query.
tenants.getBrandVoiceread-onlyRead the tenant's brand-voice settings. Returns null if unset (the pipeline falls back to a generic "warm professional" default). Read-only query.
tenants.getCalendarRoomSortread-onlyThe property-wide room order in the calendar. Any signed-in user may READ it — the calendar needs it to display rooms, not just the owner. Read-only query.
tenants.getPortalLayoutVersionread-onlyPre-arrival portal layout. Returns the current setting so the Settings UI can render the right toggle state. - "v1" = legacy Meldeschein-only wizard - "v2" = new section-based PortalShell (Meldeschein + future hotel-info sections) Existing tenants are pinned to v1; new tenants default to v2. Read-only query.
tenants.getRechnungAutoSendenread-onlyRechnungsantwort automatisch senden? Read-only query.
tenants.getReviewLinksread-onlyread the email section of channel_import_meta for the tenant. Returns the email import status, defaulting to idle when never run. Used by the email import UI in /settings/credentials to render status. Read-only query.
tenants.getReviewRequestSettingsread-onlyReturns the setting for the automatic review request after check-out: enabled and delayHours (waiting time of 1, 2 or 24 hours); with no entry, off and 1. Any signed-in role. Read-only.
tenants.getServicezeitread-onlyThe property's service hours: when the team answers guests, in minutes since midnight. Foyer inserts them into texts as `%service_from%` / `%service_until%`. Read-only query.
tenants.get_brand_voice_statsread-onlyReturns brand-voice training readiness stats for the tenant: number of manual outbound messages eligible as style anchors (length ≥ 30 chars, within 90-day lookback), last anchor timestamp, per-channel breakdown (whatsapp / email / hospitable), and the voiceTrainingEnabled flag. Read-only — no side effects.
tenants.get_channel_import_metaread-onlyRead the current Hospitable (and future channel) import status for the tenant. Returns status ('idle' | 'running' | 'done' | 'error'), lastRunAt, importedCount, and errorMessage if the last run failed. Use this to check import progress before triggering a new import.
tenants.get_email_import_metaread-onlyRead the current email (Postmark inbound) import status for the tenant. Returns status ('idle' | 'running' | 'done' | 'error'), lastRunAt, importedCount, and errorMessage if the last run failed. Use this to check email import progress before triggering a new import via triggerEmailImport.
tenants.get_faq_detection_moderead-onlyRead the tenant's FAQ detection mode: 'lexical' (trigger-phrase matching, default), 'openai', or 'voyage' (semantic embeddings). Read-only.
tenants.qualitaetZustimmungread-onlyThe property's consent to Annex 3 of the data processing agreement (improving the automatic evaluation, /avv#anlage-3) and the status of the last evaluation run (metrics without personal data). Read-only query.
tenants.qualitaetZustimmungSetzenwritesGrants or revokes consent to Annex 3 of the data processing agreement (AVV). Owner only — the owner is the one who concludes the contract. Revoking immediately deletes the property's evaluation set (AVV Annex 3 para. 8); both are recorded in audit_log. Mutation — changes data.
tenants.rechnungAutoSendenProtokollread-onlyWho received an automatic reply and who did not — and why. At most ONE “gesendet” (sent) per booking and question; if the guest asks again, this shows “entwurf / schon_automatisch_beantwortet” (draft / already answered automatically). The most recent 100. Read-only query.
tenants.setBookingHotelIdwritesSet the Booking.com hotel ID or remove it (empty/`null`). Owner only; digits only (the ID is in the extranet address, e.g. `hotel_id=64804`). Mutation — changes data.
tenants.setCalendarRoomSortwritesSets it. Owner ONLY: the order applies to all operators, and whoever changes it rearranges the list the front desk clicks on. Mutation — changes data.
tenants.setRechnungAutoSendenwritesTurns automatic sending of the invoice reply on or off. Owner only: from then on Foyer writes to guests in the owner's name without anyone reviewing it. The legacy column `tenants.rechnung_auto_senden` is kept in sync but no longer read. Mutation — changes data.
tenants.setReviewRequestSettingswritesTurns the automatic review request after check-out on or off (enabled) and sets the waiting time delayHours (1, 2 or 24, default 1). Owner only. Changes data. Mutation — changes data.
tenants.setServicezeitwritesSets the property's service hours. Owner only: the times then appear in messages to guests. Mutation — changes data.
tenants.setVoiceTrainingEnabledwritesToggle voice training (style anchors) on/off for this tenant. When disabled, buildComposeContext() skips the anchor query and the LLM falls back to the static brand-voice description only. Owner-only — affects the AI pipeline. Mutation — changes data.
tenants.set_faq_detection_modewritesSet the tenant's FAQ detection mode ('lexical' | 'openai' | 'voyage'). Semantic modes need the provider's API key in the server env and embeddings computed via ai_questions.regenerate_embeddings. Owner-only, mutating.
tenants.triggerEmailImportwritesenqueue an async email (Postmark inbound) historical import job. Guards against double-enqueue: if channel_import_meta.email.status is already 'running', returns { ok: false, reason: 'already_running' }. Otherwise sets status to 'running' and enqueues the pg-boss job `channel.import.email` which calls importEmailHistory() and writes the final status back. Mutation — changes data.
tenants.update-arrival-guide-settingswritesconfirmReplace the tenant's arrival-guide settings wholesale (address, entrance/keybox code names, weitereZugangscodes (further custom codes that are access data, e.g. Wi-Fi; withheld from bookings without access), wifi ssid/password, and per-step enabled/bodyTranslations/helpTranslations/fotos/videoUrl/nurZimmer for the 9 guide steps; door_opener/door_exit are off unless enabled:true; nurZimmer limits a step to those rooms, empty = all). fotos: up to 4 photos per step, each { key (from tenants.anreiseFotoHochladen, must belong to the step), ausschnitt? { x, y: centre 0..1 of the photo, zoom 1..4 }, ganz? { rand: '#rrggbb', oben?, unten? 0..0.4 } (show the whole photo fitted, the area beside it in that colour; oben/unten trim that share off the top/bottom first; ausschnitt is then ignored), punkte? [{ n 1..9 unique per step, x, y 0..1, b?, h? }] } — point n marks line n of the step's first numbered list; with b and h (width/height 0.02..1 of the photo, x/y = centre, must lie inside the photo) it is drawn as a numbered frame instead of a dot. pfeile? [{ n 1..9, art: 'gerade', x, y (start), zx, zy (tip), length >= 0.02 } | { n, art: 'dreh', x, y (centre), r 0.02..0.5 (radius as share of the photo width, x±r inside the photo), gegen? (true = counter-clockwise) }], max 9 per photo — motion arrows for line n; n may repeat a point's or frame's n. Legacy photoKey alone is still accepted (= fotos[0]). videoUrl must be http(s). Owner-only, mutating — replaces the whole JSONB (read-modify-write happens caller-side; send fotos back unchanged to keep crop, ganz, points and arrows).
tenants.updateBrandVoicewritesSave brand-voice settings. Owner-only — this is the operator's voice, not staff's. Empty/whitespace description is rejected (would defeat the purpose). The value lands in tenants.brand_voice_settings jsonb and is read on every L2 LLM compose via buildComposeContext(). Mutation — changes data.
tenants.updatePortalLayoutVersionwritesFlip the pre-arrival portal layout. Reversible — no destructive side effects, no token state touched. The next request to /check-in/[token] picks up the new value through the loader. Owner-only because it changes the public guest-facing surface. Mutation — changes data.
tenants.updateReviewLinkswritesReplaces the property's review links (googleMapsUrl, bookingComUrl, tripadvisorUrl, plus a custom link customUrl with customLabel); fields that are omitted or empty are removed. Owner only. Changes data. Mutation — changes data.
tenants.update_roomswritesconfirmUpdate the tenant's room count. Sockel is 30€/mo for ≤2 rooms; each additional room is 10€/mo. The matching Stripe extra-room line item is synced best-effort; the next webhook reconciliation catches any drift. Mutating action — requires _confirm: true.
till
till.addEntrywritesAdd a single cash entry. Sequence number assigned by DB trigger. Mutation — changes data.
till.balanceread-onlyRunning balance — all-time net + today subtotal + last entry timestamp. Read-only query.
till.categoriesread-onlyAvailable categories per tenant, split by type. Read-only query.
till.closeDaywritesconfirmClose (festschreiben) the cash book up to a date. Locks the period against further postings and records a chained hash.
till.closingsread-onlyThis tenant's finalizations (Festschreibungen), most recent first. Read-only query.
till.countread-onlyNumber of entries (for pagination + status displays). Read-only query.
till.forDateread-onlyEntries for a specific date. Read-only query.
till.reportread-onlyAggregated report across a date range — totals + per-category + per-day. Read-only query.
till.stornoEntrywritesconfirmReverse a cash-book (Kassenbuch) entry by booking a counter-entry. Nothing is deleted — the ledger is append-only (GoBD).
till.todayread-onlyToday's entries + day totals. Read-only query.
till.verifyChainread-onlyRecomputes the chain and reports where it breaks. A guard that states its own scope: `checked` tells how many closings were actually recomputed. Otherwise a verification tool that reads nothing would always report success. Read-only query.
unbepreist
unbepreist.imZeitraumread-onlyWork list of unpriced demand peaks: marked demand events of the region in the period from to to (YYYY-MM-DD) for which no price is set in the price calendar yet, with the premium measured from competitor prices and its quality. Any signed-in role. Read-only, does not set prices.
upsell
upsell.delete_offerwritesconfirmHard-delete an upsell offer. ON DELETE CASCADE on upsell_bookings.offer_id removes any pending booking trails. Destructive — requires confirmation.
upsell.list_bookingsread-onlyList upsell booking trail for a stay (offered, offered_no_send, accepted, declined, charged, expired). When stayId is omitted, returns the latest 50 across the tenant.
upsell.list_offersread-onlyList configured upsell offers for this tenant (active + inactive). Used by the operator to inspect what would be offered to guests 2h before check-in.
upsell.setBookingStatuswritesOperator-side override: manually accept a booking when the guest replied off-channel (phone call, in-person). Status flips to 'accepted'. Any status change of an early_checkin booking re-times the stay's arrival-day messages (frueh-neutakten.ts). Mutation — changes data.
upsell.upsert_offerwritesCreate or update an upsell offer. Pass id to update an existing row; omit it to create a new one. Price is in cents (integer).
vermietungAnfragen
vermietungAnfragen.ablehnenwritesRejects a request: status abgelehnt, open offers are withdrawn, and the prospective tenant receives a rejection (including nachricht, at most 4000 characters, if given). A paid, already rejected or withdrawn request results in CONFLICT, a request of another tenant in NOT_FOUND. Returns mailGesendet (false: the email did not go out, the rejection stands). Owner of a rental tenant only. Changes data and sends an email. Mutation — changes data.
vermietungAnfragen.angebotSchickenwritesSends the prospective tenant an offer with a payment link. Without einzug, auszug (last day of the tenancy) and monatsmieteCents, those of the request and of the apartment apply; the first payment is always the full monthly rent. The deadline is fristStunden (12 to 336) from now, otherwise the offer deadline from the settings. The HousingAnywhere calendar is pulled fresh beforehand; if that fails, the offer still goes out and haAbruf names the state. Duration (minimum and maximum months, move-in not in the past) and calendar are checked again: not permitted or occupied results in CONFLICT. A previously open offer of the same request is withdrawn and the request becomes angeboten; for rejected, paid or cancelled requests the result is CONFLICT. Returns angebotId, link, haAbruf and mailGesendet (false: the email did not go out, the link is returned here anyway). A request of another tenant results in NOT_FOUND. Owner of a rental tenant only. Changes data and sends an email to the prospective tenant. Mutation — changes data.
vermietungAnfragen.angebotZurueckziehenwritesWithdraws an open offer; the request goes back to angefragt. An offer that is no longer open (paid, expired, already withdrawn) results in CONFLICT, an offer of another tenant in NOT_FOUND. The prospective tenant is not notified. Owner of a rental tenant only. Changes data. Mutation — changes data.
vermietungAnfragen.holenread-onlyOne request with all details of the prospective tenant (name, email, phone, message, language), its offers (period, monthly rent, first payment, deadline, status, and the link for an open offer) and frei: whether the requested period is still free right now. A request of another tenant or an unknown one results in NOT_FOUND. Owner of a rental tenant only. Read-only query.
vermietungAnfragen.listeread-onlyThe requests from prospective tenants, newest first (at most 500): id, wohnung (title), name, einzug and auszug (YYYY-MM-DD, auszug = last day of the tenancy), monate, status (angefragt, angeboten, bezahlt, abgelehnt, zurueckgezogen, abgelaufen, storniert) and createdAt. With status only requests in that status. Owner of a rental tenant only. Read-only query.
vermietungAnfragen.nachfragenwritesSends the prospective tenant a question from the landlord (text, 1 to 4000 characters) by email; the reply goes directly to the landlord. The status of the request stays. Only for requests in status angefragt or angeboten, otherwise CONFLICT; a request of another tenant results in NOT_FOUND. If sending fails, the call fails. Owner of a rental tenant only. Sends an email. Mutation — changes data.
vermietungBelegung
vermietungBelegung.haAbrufenwritesPulls the active HousingAnywhere source of an apartment fresh and takes over its occupancy; if the last pull was less than 60 seconds ago, it does not pull again but reports the stored state. Returns status (aktuell, zuletzt_gueltig, unbekannt, keine_quelle), letzterErfolg and fehler. An apartment of another tenant results in NOT_FOUND. Owner of a rental tenant only. Changes data. Mutation — changes data.
vermietungBelegung.haQuelleSetzenwritesSets the HousingAnywhere calendar address of an apartment (url, exactly the form https://housinganywhere.com/api/v2/listing/<digits>/calendar/<secret>/<language>; anything else results in BAD_REQUEST) and pulls it immediately. The previous source is switched off (at most one stays active) and its upcoming imported stays are cancelled; url null only switches off. An address still active on another apartment results in CONFLICT. If the pull fails, the source stays saved and haAbruf names the error. Returns haAbruf. An apartment of another tenant results in NOT_FOUND. Owner of a rental tenant only. Changes data. Mutation — changes data.
vermietungBelegung.sperreEntfernenwritesLifts the own blocks of an apartment from von to bis (both inclusive) and returns the number of nights released. Nights of tenancies and blocks with a different reason stay untouched. An apartment of another tenant results in NOT_FOUND. Owner of a rental tenant only. Deletes data. Mutation — changes data.
vermietungBelegung.sperreSetzenwritesBlocks an apartment from von to bis (both inclusive, YYYY-MM-DD) with a reason (at most 120 characters, one line) and returns the number of blocked nights. If even one night is already occupied (tenancy, HousingAnywhere import or another block), the result is CONFLICT and nothing is blocked; von after bis results in BAD_REQUEST, as does a block longer than three years; an apartment of another tenant results in NOT_FOUND. Owner of a rental tenant only. Changes data. Mutation — changes data.
vermietungBelegung.uebersichtread-onlyThe occupancy of all apartments from today (Berlin) for 12 or 24 months (monate): per apartment wohnungId, kuerzel, titel and the occupancy as ranges from von to bisExklusiv (the day the apartment is free again) with the source: mietverhaeltnis, import (HousingAnywhere calendar, label = platform), sperre (own block, label = reason) or sonstige. Owner of a rental tenant only. Read-only query.
vermietungEinstellungen
vermietungEinstellungen.holenread-onlyReturns the settings of the rental business: offer deadline in hours, contact email, deposit and response-time notes, and the `oeffentlich` switch. Defaults (72 hours deadline) while nothing is saved. Owner of a rental tenant only. Read-only query.
vermietungEinstellungen.speichernwritesSaves the settings sent (angebotsfristStunden 12 to 336, kontaktEmail as one single address or empty/null to clear it, kautionHinweis up to 2000 and antwortzeitHinweis up to 200 characters) and returns the whole row. Fields not sent stay as they are. This procedure never changes the `oeffentlich` switch. Owner of a rental tenant only. Changes data. Mutation — changes data.
vermietungHaeuser
vermietungHaeuser.aendernwritesChanges the fields sent for a house (id, plus name, strasse, plz, ort, lageText; a null lageText clears the text). A house of another tenant results in NOT_FOUND. Owner of a rental tenant only. Changes data. Mutation — changes data.
vermietungHaeuser.anlegenwritesCreates a house (name, strasse, plz, ort, optional lageText) and returns its id. Owner of a rental tenant only. Changes data. Mutation — changes data.
vermietungHaeuser.listeread-onlyLists all houses of the rental business (name, street, postal code, city, location description), sorted by creation. Owner of a rental tenant only. Read-only query.
vermietungMietverhaeltnisse
vermietungMietverhaeltnisse.holenread-onlyOne tenancy with tenant (name, email, phone), apartment, period, amount and status, plus the ids of apartment, request and offer, the Stripe payment (paymentIntentId), storniertAm and createdAt. A tenancy of another tenant or an unknown one results in NOT_FOUND. Owner of a rental tenant only. Read-only query.
vermietungMietverhaeltnisse.listeread-onlyThe tenancies (paid rents), sorted by move-in (at most 500): id, wohnung (title), name, email, telefon, einzug and auszug (YYYY-MM-DD, auszug = last day of the tenancy), betragCents (first payment) and status (bestaetigt, storniert). With ab (YYYY-MM-DD) only those whose move-out is on or after that day. Owner of a rental tenant only. Read-only query.
vermietungMietverhaeltnisse.stornierenwritesCancels a confirmed tenancy (grund: 1 to 500 characters, one line): status storniert, the blocked nights of the apartment become free, the request is cancelled. Foyer refunds NOTHING — hinweis says the refund has to be issued in Stripe. An already cancelled tenancy results in CONFLICT, one of another tenant or an unknown one in NOT_FOUND. Owner of a rental tenant only. Changes data. Mutation — changes data.
vermietungWohnungen
vermietungWohnungen.aendernwritesChanges the fields sent for an apartment (id, plus any fields as in `anlegen`; null clears optional texts). It never changes the room or the export token. maxMonate below minMonate results in BAD_REQUEST, a duplicate kuerzel in CONFLICT, an apartment or house of another tenant in NOT_FOUND. Owner of a rental tenant only. Changes data. Mutation — changes data.
vermietungWohnungen.anlegenwritesCreates an apartment: hausId, kuerzel (a-z, 0-9, hyphen), roomName (room name, at most 32 characters), titelDe, titelEn and monatsmieteCents are required, everything else has defaults. Creates the room and the apartment with a secret export token in one step. A duplicate kuerzel or room name results in CONFLICT (nothing is left behind), a house of another tenant in NOT_FOUND. Returns the id. Owner of a rental tenant only. Changes data. Mutation — changes data.
vermietungWohnungen.bildEntfernenwritesRemoves an image of an apartment (bildId from `holen`) together with its file. An image of another tenant results in NOT_FOUND. Owner of a rental tenant only. Deletes data. Mutation — changes data.
vermietungWohnungen.bildReihenfolgewritesReorders the images of an apartment: bildIds in the desired order, first image first; images not listed follow in their previous order. Every bildId must belong to this apartment, otherwise NOT_FOUND and nothing changes; duplicate bildIds result in BAD_REQUEST. Owner of a rental tenant only. Changes data. Mutation — changes data.
vermietungWohnungen.exportTokenErneuernwritesGenerates a new secret token for the iCal export of an apartment and returns the new address. The old address returns nothing afterwards; HousingAnywhere must be given the new one. An apartment of another tenant results in NOT_FOUND. Owner of a rental tenant only. Changes data. Mutation — changes data.
vermietungWohnungen.holenread-onlyReturns one apartment with all fields, its room name (roomName), the iCal export address (exportAdresse), the HousingAnywhere source (haQuelle: url, last success, last error, or null) and its images in order. An apartment of another tenant results in NOT_FOUND. Owner of a rental tenant only. Read-only query.
vermietungWohnungen.listeread-onlyLists all apartments of the rental business (short code, title, house, monthly rent in cents, active) with `freiAb`: the first day from which the apartment's minimum rental duration is free without a break (YYYY-MM-DD, today in Berlin at the earliest), or null for switched-off apartments and when nothing is free in the next 24 months. Owner of a rental tenant only. Read-only query.
voice
voice.config.getread-onlyRead the VAPI voice bot configuration for the current tenant. Returns null if not yet configured. API key is excluded. Read-only.
voice.config.updatewritesUpdate voice bot settings: enabled toggle, language, or greeting name. API key is excluded from this surface for security — use the Operator Settings UI instead.
voice-availability
voice-availability.checkread-onlyCheck live availability and nightly rate for a date range. Designed for the VAPI voice-agent tool-call surface — returns a spoken-friendly `spokenRate` string per option. Inventory is grouped by room type. Returns available:false if no inventory remains for the full stay window.
voice-calls
voice-calls.getread-onlyFetch a single voice-AI-agent call by id, with its full action timeline (every MCP tool the agent invoked during the call, oldest-first). RLS blocks cross-tenant reads — unknown id returns an empty actions list and call:null.
voice-calls.listread-onlyList voice-AI-agent calls for this tenant, newest-first. Default window: last 30 days. Optionally filter by outcome (hold_created/info_only/transferred/dropped/failed). Used by external agents + operator MCP clients to inspect recent voice activity.
voice-facts
voice-facts.lookupread-onlyLook up hotel facts (WiFi, parking, breakfast, check-in hours, etc.) by keyword for the VAPI voice-agent. Searches across fact key, category, description, and translated values. Returns up to 5 matches with a spoken-friendly answer per match (de → en → first-locale fallback).
voice-hold
voice-hold.createwritesPlace a 125-minute soft-hold on a room and send the caller an SMS with the confirmation link. Designed for the VAPI voice-agent — call after the guest verbally accepts a rate from voice-availability.check. Returns stayId + payLinkUrl + holdExpiresAt; the agent reads the expiry back to the guest.
voiceCalls
voiceCalls.byIdread-onlyFetch a single voice call by id, plus its full action timeline (every MCP tool invocation, oldest-first so the timeline reads top-down). Returns NOT_FOUND if the call is in a different tenant (RLS hides it) or simply doesn't exist. Read-only query.
voiceCalls.zumAufenthaltread-onlyList the voice-agent calls that led to one stay (`voice_agent_calls.stay_id`), newest-first. Returns only id, caller number (null if withheld), start time and outcome - never transcript or summary. Same permission as `list`; RLS pins to the caller's tenant. Read-only query.
vorfaelle
vorfaelle.erledigenwritesResolves an alert, recording the person and the time. No deletion: what was detected remains traceable. The list of resolved alerts is also the only way to check later whether the detection is any good. Mutation — changes data.
vorfaelle.erledigteread-onlyThe most recently resolved alerts, so that the hit rate can be assessed. Read-only query.
vorfaelle.offeneread-onlyThe open alerts, critical first, then the oldest. OLDEST FIRST within a level, not newest: an alert that has been open for a long time is the one that was overlooked. That is exactly what happened 22 times at Hospitable. Read-only query.
vorfaelle.verlaufread-onlyHistory of detected problems: when each label was detected, by whom (guest, AI, staff member, rule) it was resolved and reopened. With `stayId` the history of one stay, oldest first; without it the issues resolved in the last `tage` days (default 7), newest first. Read-only.
webhooks
webhooks.listread-onlyRead-only list of webhook subscriptions: URL, events, active flag, description, last-delivered-at, last-failed-at. Secrets are never returned via MCP — they exist only on the original web-UI create-flow.
webhooks.list_deliveriesread-onlyRecent delivery attempts for a single webhook subscription. Helpful for debugging '405 from receiver' or 'last failed at...' situations via Claude. Read-only.
wettbewerb
wettbewerb.fuerZeitraumread-onlyCompetitor prices for a period, ascending by date. Read-only query.
zimmerWissen
zimmerWissen.listread-onlyAll active rooms with their effective knowledge (bathroom, number of persons, beds, amenities including their origin; per amenity present, explicitly not present, or unknown, with an optional note) and the stored entries per room type and room. Read-only query.
zimmerWissen.loeschenwritesRemoves the entry for a room type or a room (owner only); the room then inherits everything from the type again. Mutation — changes data.
zimmerWissen.upsertwritesCreates or changes the knowledge for a room type or an individual room (owner only); fields not passed remain unchanged, `null` clears a field, and every actual change is recorded in the audit log. There are three states per amenity: `ausstattung` (present), `nichtVorhanden` (explicitly not present), or in neither list (unknown — the property then does not answer the guest). A key must not appear in both lists; to switch, send both lists in the same call… Mutation — changes data.
zimmerWissen.vorschlaegeread-onlySuggests values for empty fields from the room types without storing anything: bathroom from the type name, number of persons from the existing source or the type name. Read-only query.
zimmerbilder
zimmerbilder.abgleichenwritesFetches the gallery of all units of the property. Idempotent: images already fetched are not loaded again. A second run therefore fetches only what has been added since the first. Mutation — changes data.