Skip to main content
Glama

hemmabo_booking_create

Create a pending direct booking when no signed VRP booking URL is available. It checks property availability first, then writes a booking awaiting host confirmation with guest contact details.

Instructions

Create a pending direct booking without online payment for configured non-VRP fallback deployments. Use only after explicit user confirmation, with a propertyId from search, and only when no signed VRP direct_booking_url is available. For signed VRP offers, route to the signed host-domain URL instead. Requires Authorization: Bearer token (MCP_API_KEY or OAuth); rate-limited per token. Writes exactly one pending booking awaiting the host's decision; availability is checked first — conflicts or a stale calendar fail the call before anything is written. Not idempotent — check hemmabo_booking_status before retrying on timeout. There is no price or quoteId parameter — the node prices the stay itself at creation (gap-night pricing applies automatically). The booking is identified by propertyId + the checkIn/checkOut range + guests; guestName and guestEmail are required for host confirmation, guestPhone is optional. Returns bookingId and a one-time guestToken for later status/cancel/reschedule.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guestsYesTotal guest count as a positive integer (e.g. 2, 4, 6). Used for capacity filtering and staircase pricing tiers. Properties with maxGuests below this value are excluded from search results.
checkInYesArrival date in ISO 8601 calendar format YYYY-MM-DD (e.g. '2026-07-15'). Must be today or later in the property's timezone. Must be strictly before checkOut; together they define the stay length used for pricing and availability.
checkOutYesDeparture date in ISO 8601 calendar format YYYY-MM-DD (e.g. '2026-07-22'). Must be strictly after checkIn on the same calendar. The guest does not stay the departure night.
guestNameYesPrimary guest full name as plain text (e.g. 'Anna Svensson'). Stored on the booking for host confirmation; use the name the guest provided.
guestEmailYesPrimary guest email in RFC 5322 format (e.g. 'anna@example.com'). Used for booking confirmation and host contact; must be deliverable.
guestPhoneNoPrimary guest phone in E.164 format with country code (e.g. '+46701234567'). Optional; omit when unknown. Recommended for check-in coordination.
propertyIdYesStable property UUID from hemmabo_search_properties (e.g. '550e8400-e29b-41d4-a716-446655440000'). Pass the exact UUID string — never a property name, host domain, or booking URL.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent only when isError=true.
guestsNo
nightsNo
statusYesHost-node booking status. 'completed' is a protocol compatibility output only, not a status this tool writes.
checkInNo
checkOutNo
currencyNo
bookingIdYesPersistent booking UUID. Use for status/cancel/reschedule.
createdAtNo
priceTypeNoPricing mode used (federation/gap_night/package_*).
guestTokenNoPer-booking secret (guest_token) for this booking. Present it back as guestToken on hemmabo_booking_status / hemmabo_booking_cancel / hemmabo_booking_reschedule to view or modify this booking; a Bearer token alone is not sufficient. Store it securely and do not show it to the guest.
propertyIdNo
totalPriceNoFinal price written to the booking.
channel_mirrorNoOutbound channel-manager mirror heartbeat for the host's mapped external channel (status: current|stale|partial|error|not_connected). Informational only — it never affects availability or this booking; the host node is the source of truth.
packageAppliedNo
calendar_freshnessNoIncoming OTA calendar-sync freshness at booking time. The same object is embedded in the error payload when a stale calendar blocks the call — declared here so agents can treat it as a first-class field in both outcomes.
gapDiscountPercentNo
federationDiscountPercentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv4.0.5
    • addedOutput schema / properties / guestToken
      Added value: +{
      +  "description": "Per-booking secret (guest_token) for this booking. Present it back as guestToken on hemmabo_booking_status / hemmabo_booking_cancel / hemmabo_booking_reschedule to view or modify this booking; a Bearer token alone is not sufficient. Store it securely and do not show it to the guest.",
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv0.1.12
    • addedOutput schema / properties / calendar_freshness
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "Incoming OTA calendar-sync freshness at booking time. The same object is embedded in the error payload when a stale calendar blocks the call — declared here so agents can treat it as a first-class field in both outcomes.",
      +  "type": "object"
      +}
    • addedOutput schema / properties / channel_mirror
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "Outbound channel-manager mirror heartbeat for the host's mapped external channel (status: current|stale|partial|error|not_connected). Informational only — it never affects availability or this booking; the host node is the source of truth.",
      +  "type": "object"
      +}
  3. Changed6 schema fields changedv0.1.6
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / guestEmail / pattern
      Removed value: -"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    • removedInput schema / properties / guests / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / propertyId / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "bookingId": {
      +      "description": "Persistent booking UUID. Use for status/cancel/reschedule.",
      +      "format": "uuid",
      +      "type": "string"
      +    },
      +    "checkIn": {
      +      "type": "string"
      +    },
      +    "checkOut": {
      +      "type": "string"
      +    },
      +    "createdAt": {
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "currency": {
      +      "type": "string"
      +    },
      +    "error": {
      +      "description": "Present only when isError=true.",
      +      "type": "string"
      +    },
      +    "federationDiscountPercent": {
      +      "type": "integer"
      +    },
      +    "gapDiscountPercent": {
      +      "type": "integer"
      +    },
      +    "guests": {
      +      "type": "integer"
      +    },
      +    "nights": {
      +      "type": "integer"
      +    },
      +    "packageApplied": {
      +      "type": "string"
      +    },
      +    "priceType": {
      +      "description": "Pricing mode used (federation/gap_night/package_*).",
      +      "type": "string"
      +    },
      +    "propertyId": {
      +      "format": "uuid",
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "Host-node booking status. 'completed' is a protocol compatibility output only, not a status this tool writes.",
      +      "enum": [
      +        "pending",
      +        "confirmed",
      +        "cancelled",
      +        "completed"
      +      ],
      +      "type": "string"
      +    },
      +    "totalPrice": {
      +      "description": "Final price written to the booking.",
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "bookingId",
      +    "status"
      +  ],
      +  "type": "object"
      +}
  4. Changed7 schema fields changedv0.1.5
    • changedInput schema / properties / checkIn / description
      Previous value: -"Booking arrival date in YYYY-MM-DD format."New value: +"Arrival date in ISO 8601 calendar format YYYY-MM-DD (e.g. '2026-07-15'). Must be today or later in the property's timezone. Must be strictly before checkOut; together they define the stay length used for pricing and availability."
    • changedInput schema / properties / checkOut / description
      Previous value: -"Booking departure date in YYYY-MM-DD format; must be after checkIn."New value: +"Departure date in ISO 8601 calendar format YYYY-MM-DD (e.g. '2026-07-22'). Must be strictly after checkIn on the same calendar. The guest does not stay the departure night."
    • changedInput schema / properties / guestEmail / description
      Previous value: -"Primary guest email for confirmation and host contact."New value: +"Primary guest email in RFC 5322 format (e.g. 'anna@example.com'). Used for booking confirmation and host contact; must be deliverable."
    • changedInput schema / properties / guestName / description
      Previous value: -"Primary guest name for host confirmation."New value: +"Primary guest full name as plain text (e.g. 'Anna Svensson'). Stored on the booking for host confirmation; use the name the guest provided."
    • changedInput schema / properties / guestPhone / description
      Previous value: -"Primary guest phone with country code; optional but recommended."New value: +"Primary guest phone in E.164 format with country code (e.g. '+46701234567'). Optional; omit when unknown. Recommended for check-in coordination."
    • changedInput schema / properties / guests / description
      Previous value: -"Total number of guests as integer >= 1 (e.g. 4)."New value: +"Total guest count as a positive integer (e.g. 2, 4, 6). Used for capacity filtering and staircase pricing tiers. Properties with maxGuests below this value are excluded from search results."
    • changedInput schema / properties / propertyId / description
      Previous value: -"Property UUID returned by hemmabo_search_properties for this fallback non-VRP booking. Use the exact UUID, not a property name, domain, or booking URL."New value: +"Stable property UUID from hemmabo_search_properties (e.g. '550e8400-e29b-41d4-a716-446655440000'). Pass the exact UUID string — never a property name, host domain, or booking URL."
  5. Changed6 schema fields changedv0.1.4
    • changedInput schema / properties / checkIn / description
      Previous value: -"Arrival date in ISO 8601 format (YYYY-MM-DD, e.g. '2026-07-15'). Must be today or later."New value: +"Booking arrival date in YYYY-MM-DD format."
    • changedInput schema / properties / checkOut / description
      Previous value: -"Departure date in ISO 8601 format (YYYY-MM-DD, e.g. '2026-07-22'). Must be after checkIn."New value: +"Booking departure date in YYYY-MM-DD format; must be after checkIn."
    • changedInput schema / properties / guestEmail / description
      Previous value: -"Email for booking confirmation (e.g. 'anna@example.com'). Must be a valid email address."New value: +"Primary guest email for confirmation and host contact."
    • changedInput schema / properties / guestName / description
      Previous value: -"Full name of primary guest (e.g. 'Anna Svensson')."New value: +"Primary guest name for host confirmation."
    • changedInput schema / properties / guestPhone / description
      Previous value: -"Phone with country code (e.g. '+46701234567'). Optional but recommended for check-in coordination."New value: +"Primary guest phone with country code; optional but recommended."
    • changedInput schema / properties / propertyId / description
      Previous value: -"Property UUID from hemmabo_search_properties (e.g. '550e8400-e29b-41d4-a716-446655440000')."New value: +"Property UUID returned by hemmabo_search_properties for this fallback non-VRP booking. Use the exact UUID, not a property name, domain, or booking URL."
  6. Changed1 schema field changedv0.1.3
    • changedInput schema / properties / propertyId / description
      Previous value: -"Property UUID from search.properties (e.g. '550e8400-e29b-41d4-a716-446655440000')."New value: +"Property UUID from hemmabo_search_properties (e.g. '550e8400-e29b-41d4-a716-446655440000')."
  7. Addedv0.1.1

TDQS

A4.9/5.0
Behavior5/5

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

Discloses that availability is checked first and conflicts fail before writing, that the call is not idempotent (matching idempotentHint=false), and that it requires Authorization and is rate-limited. It also notes exact write behavior and returns a one-time guestToken. This goes well beyond the annotations, providing deep operational context without contradicting them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Despite length, every sentence adds essential information: purpose, usage conditions, auth, behavior, idempotency, pricing, required fields, and return values. It is logically ordered and front-loads the most critical scoping and usage constraints.

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

Completeness5/5

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

The description covers all operational aspects an agent would need: when to use, auth/rate limits, availability pre-check, idempotency handling, pricing behavior, required/optional parameters, and return values. Given the tool's complexity and the existence of an output schema, nothing critical is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so parameters are already documented. The description adds value by clarifying there is no price or quoteId parameter, that the node prices the stay itself, and that guestName and guestEmail are required while guestPhone is optional. It also explains how the booking is identified, which is not explicit in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool creates a pending direct booking without online payment for non-VRP fallback deployments. It distinguishes this from signed VRP offers by explicitly naming the alternative, making the purpose unmistakable and differentiated from sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to use only after user confirmation, with a propertyId from search, and only when no signed VRP direct_booking_url is available. It also tells the agent to route signed VRP offers to the host-domain URL instead, and advises checking status before retrying on timeout. This is clear when/when-not guidance with an alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.