Sprawdź terminy
check_availabilityPURPOSE: Returns real, currently free appointment slots for a quote_id (new booking) or for an existing booking_reference (rescheduling, needs customer_grant). WHEN TO USE: When the customer asks when we can come, after calculate_quote. wanted.type: asap (earliest), date (one day), range (from-to), preferred (a day + nearby days, sorted by preferred_time); optional part_of_day. If type is omitted it follows the fields given (date -> date, from/to -> range, nothing -> asap). WHEN NOT TO USE: Never to book - it reserves nothing and holds no slot. REQUIRED: quote_id (or booking_reference + customer_grant). Dates as YYYY-MM-DD, Polish time. SIDE EFFECTS: none (read-only; slot_id values are valid ~15 minutes). RESULT: slots found -> success=true, slots[]. None in the requested period -> success=false, error="no_availability", next_available (date or null) and alternative_slots[] - offer those. Past date -> error date_in_past; beyond the online booking horizon -> error date_out_of_range. Never invent a slot.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "check_availability"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wanted | No | Optional preference; empty = earliest slots | |
| quote_id | No | quote_id from calculate_quote (new booking) | |
| session_id | No | Optional. session_id from the previous result, if you have it. The server also recovers the session from quote_id / slot_id / confirmation_id / customer_grant. | |
| customer_grant | No | customer_grant returned by verify_phone_code | |
| booking_reference | No | Existing booking to reschedule (requires customer_grant) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| error | No | Stable machine-readable error id when success=false, e.g. missing_required_fields, unsupported_postcode, no_availability | |
| slots | No | ||
| reason | No | ||
| message | No | ||
| success | Yes | true = operation done / data returned; false = see error | |
| searched | No | ||
| session_id | No | ||
| missing_fields | No | ||
| next_available | No | ||
| alternative_slots | No |