{
 "name": "Santiago booking API for the customer's own AI",
 "tools": [
  {
   "name": "search_services",
   "description": "Find businesses and their services for a request, like 'haircut' or 'clogged sink', near a US ZIP. Results come in a fair order; nobody pays to rank. 'list' has every business that fits, in order, each with its rating from reviews and their count, its price, distance, first open time and why it matched; show them all and let the customer choose (never pick for them). 'results' has the booking details of the first 5. Each service carries its price, what is due when booking, the cancel and no-show terms and how the rest is paid; each business says who a booking may be for and any questions to ask the customer before the times. If the result's status is 'safety', pass its message to the customer word for word and book nothing.",
   "inputSchema": {
    "type": "object",
    "properties": {
     "query": {
      "type": "string"
     },
     "zip": {
      "type": "string"
     },
     "far": {
      "type": "boolean",
      "description": "Also list businesses farther than 60 miles, each with its distance; only when the customer asks to see farther ones"
     },
     "sort": {
      "type": "array",
      "items": {
       "type": "string",
       "enum": [
        "soonest",
        "nearest",
        "cheapest",
        "rating"
       ]
      },
      "description": "The customer's own order, only when they asked for one ('rating' is best-rated by reviews; 'best and cheapest' is [\"rating\", \"cheapest\"]). None: soonest, then nearest."
     },
     "maxPrice": {
      "type": "number",
      "description": "Dollars: only prices at or under this (for priceFor, else the request's service)"
     },
     "minPrice": {
      "type": "number",
      "description": "Dollars: only prices at or over this"
     },
     "priceFor": {
      "type": "string",
      "description": "The service a price filter is for, as the customer said it"
     },
     "minRating": {
      "type": "number",
      "description": "Only businesses rated at least this many stars by reviews"
     },
     "place": {
      "type": "string",
      "enum": [
       "shop",
       "home",
       "video"
      ],
      "description": "At the business, at the customer's place, or by video"
     },
     "day": {
      "type": "string",
      "description": "A day it must be open, as the customer said it"
     },
     "time": {
      "type": "string",
      "description": "A part of the day it must be open, as said ('morning', 'after 5pm')"
     },
     "language": {
      "type": "string",
      "description": "A language the pro speaks"
     }
    },
    "required": [
     "query"
    ]
   }
  },
  {
   "name": "list_times",
   "description": "Real open start times for one service, or for several on the same visit (serviceId \"s1,s2\"). Work quoted from photos has no times: book it with no start, and the customer sends photos in the chat. For a class or a table, give partySize (how many people, counting the customer): only times with room for all of them come back, each with the party's total. Each time names its person and their price; staffName (a first name the customer asked for) returns only that person's times.",
   "inputSchema": {
    "type": "object",
    "properties": {
     "businessId": {
      "type": "string"
     },
     "serviceId": {
      "type": "string"
     },
     "date": {
      "type": "string",
      "description": "YYYY-MM-DD, optional"
     },
     "partySize": {
      "type": "integer",
      "minimum": 1,
      "maximum": 30
     },
     "zip": {
      "type": "string",
      "description": "For a visit at the customer's place: the visit's ZIP. A place outside the business's travel area gets status 'outside' and no times."
     },
     "staffName": {
      "type": "string",
      "description": "Only this person's times, when the customer asked for someone by name"
     },
     "itemId": {
      "type": "string",
      "description": "Only this listed thing's times (a home, a car, a boat, a room), from list_items"
     },
     "spot": {
      "type": "string",
      "description": "For a visit at one of the business's meeting spots: the spot's name. Several spots and none given gets status 'need' with the spots to pick from."
     }
    },
    "required": [
     "businessId",
     "serviceId"
    ]
   }
  },
  {
   "name": "book",
   "description": "Book a time for the customer. With no serviceId, give the customer's own words in service and it is matched to the business's list; a service the business doesn't offer gets status 'not_offered' with its list (and the closest one, when there is one). First, before any name or number, ask who it's for (bookingFor) and whether the customer is 18 or older (bookerIs18OrOlder); for a child, also whether they are the parent or guardian. A mobile is required. If nothing is due before the visit it is booked at once; if money or a card is due, the time is held 15 minutes and you get a secure pay link to hand the customer. Never ask for or pass a street address, card numbers, door codes or a child's details: the customer types those on the secure page. A visit at the customer's place answers 'details' with a detailsUrl: the time is held 15 minutes while the customer adds the street address there. If the result's status is 'need', ask the customer what it lists and call book again. If it is 'safety', pass its message to the customer word for word.",
   "inputSchema": {
    "type": "object",
    "properties": {
     "businessId": {
      "type": "string"
     },
     "serviceId": {
      "type": "string",
      "description": "One service, or several on the same visit as \"s1,s2\""
     },
     "service": {
      "type": "string",
      "description": "The customer's own words for the service, when there is no serviceId"
     },
     "start": {
      "type": "string",
      "description": "ISO start time from list_times; empty for work quoted from photos"
     },
     "bookingFor": {
      "type": "string",
      "enum": [
       "me",
       "my_child",
       "another_adult",
       "adult_i_act_for",
       "my_organization"
      ]
     },
     "bookerIs18OrOlder": {
      "type": "boolean"
     },
     "bookerIsParentOrGuardian": {
      "type": "boolean",
      "description": "Only when bookingFor is my_child"
     },
     "bookerIs13OrOlder": {
      "type": "boolean",
      "description": "Only when a book result asks for it"
     },
     "servedFirstName": {
      "type": "string",
      "description": "Another adult's first name only, or the organization's name; never a child's"
     },
     "servedMobile": {
      "type": "string",
      "description": "Only when bookingFor is another_adult: that adult's own mobile, if the customer gives it. Nothing is texted to it on your word; it only lets their own text join them to the visit. You get a servedLink for the customer to forward."
     },
     "partySize": {
      "type": "integer",
      "minimum": 1,
      "maximum": 30,
      "description": "Classes and tables: how many people, counting the customer"
     },
     "name": {
      "type": "string"
     },
     "mobile": {
      "type": "string",
      "description": "The booker's own mobile (required). The confirmation goes there."
     },
     "email": {
      "type": "string"
     },
     "way": {
      "type": "string",
      "enum": [
       "texts",
       "texts_only",
       "email"
      ],
      "description": "How the business reaches the customer about this visit: texts (default), texts_only (never a voice call) or email (every message by email; needs email). Ask the customer."
     },
     "meet": {
      "type": "string",
      "enum": [
       "me",
       "someone",
       "nobody"
      ],
      "description": "Visits at the customer's place: who meets the pro. someone: you get a meetLink for that person to add their own mobile and say yes to texts; they get the visit texts and the code. nobody: only where the work allows it."
     },
     "zip": {
      "type": "string",
      "description": "The visit's ZIP, for visits at the customer's place"
     },
     "spot": {
      "type": "string",
      "description": "For a visit at one of the business's meeting spots: the spot's name, as list_times gave it"
     },
     "answers": {
      "type": "string",
      "description": "The customer's answers to the business's questions (search_services and list_times give them), in their words, in one message; 'No idea' is fine. Required when the business has questions."
     },
     "safeNow": {
      "type": "string",
      "description": "Only after a safety answer: the customer's own words that they are safe now"
     },
     "staffName": {
      "type": "string",
      "description": "The person the customer asked for by name, as given to list_times"
     },
     "itemId": {
      "type": "string",
      "description": "The listed thing the customer picked, from list_items"
     },
     "payer": {
      "type": "object",
      "description": "Only when someone else pays the rest (an employer, a family member): their name and email, or a mobile. What is due now is paid on the secure page by the customer; the rest goes to the payer as a pay link after the visit. Never a card.",
      "properties": {
       "name": {
        "type": "string"
       },
       "email": {
        "type": "string"
       },
       "mobile": {
        "type": "string"
       }
      }
     },
     "planName": {
      "type": "string",
      "description": "Work billed to a plan or insurance: the plan's name only. Its number goes on the secure page, never through you."
     },
     "memberPaysElsewhere": {
      "type": "boolean",
      "description": "Classes: true when the customer pays this business for a membership outside Santiago. Ask it only where the business has classes."
     },
     "acceptNoFreeCancel": {
      "type": "boolean",
      "description": "Only after the customer said OK to a time with no free cancel (list_times marks it noFreeCancel, and book asks it first)"
     },
     "waitInLine": {
      "type": "boolean",
      "description": "Only after a 'taken' answer with canWait true, when the customer wants to be next for that time: book again with the same start. Nothing is held; if the time is let go it's saved for them at once (check booking_status)."
     }
    },
    "required": [
     "businessId",
     "serviceId",
     "start",
     "bookingFor",
     "bookerIs18OrOlder",
     "name",
     "mobile"
    ]
   }
  },
  {
   "name": "list_items",
   "description": "The particular things a business books on their own (a home to see, a car, a boat, a room), each with its services and prices. Give itemId to list_times and book to book that one. Addresses and access notes are never here: the customer sees them on the secure page after booking.",
   "inputSchema": {
    "type": "object",
    "properties": {
     "businessId": {
      "type": "string"
     }
    },
    "required": [
     "businessId"
    ]
   }
  },
  {
   "name": "join_waitlist",
   "description": "Only when list_times answered waitlist: true for a full day. Ask the customer if they want a text if a spot opens that day; only with their own yes, call this with acceptWaitlist true and their mobile. Nothing is held or charged. You get a chatLink to give the customer: they tap it and send the text that opens, and if a spot opens they hear in that chat; the first to book it gets it.",
   "inputSchema": {
    "type": "object",
    "properties": {
     "businessId": {
      "type": "string"
     },
     "serviceId": {
      "type": "string"
     },
     "date": {
      "type": "string",
      "description": "The full day, YYYY-MM-DD, as asked of list_times"
     },
     "mobile": {
      "type": "string",
      "description": "The customer's own mobile (required). The waitlist texts go there."
     },
     "name": {
      "type": "string"
     },
     "email": {
      "type": "string"
     },
     "bookerIs18OrOlder": {
      "type": "boolean"
     },
     "acceptWaitlist": {
      "type": "boolean",
      "description": "Only after the customer said yes to a text if a spot opens"
     }
    },
    "required": [
     "businessId",
     "serviceId",
     "date",
     "mobile",
     "bookerIs18OrOlder",
     "acceptWaitlist"
    ]
   }
  },
  {
   "name": "booking_status",
   "description": "The booking you made, as it stands now. Needs the statusKey that book returned (keep it: it's the only way to see the booking). A ref alone shows nothing, and nothing is ever said about anyone else's visits.",
   "inputSchema": {
    "type": "object",
    "properties": {
     "statusKey": {
      "type": "string",
      "description": "The statusKey book returned"
     },
     "ref": {
      "type": "string",
      "description": "The booking ref, optional"
     }
    },
    "required": [
     "statusKey"
    ]
   }
  }
 ],
 "mcp": "https://sentaigo.com/mcp",
 "privacy": "https://sentaigo.com/privacy",
 "rules": [
  "Every request is checked for danger first; a safety answer goes to the customer word for word.",
  "Ask who it's for and whether the customer is 18 or older before any name or number.",
  "A mobile is required to book.",
  "Nothing due now: booked at once. Money or a card due: held 15 minutes, pay link returned.",
  "Codes, addresses and cards are never returned.",
  "book returns a statusKey once: the status of that booking needs it (header x-status-key, or the key as the path). A ref alone shows nothing, and nothing is said about anyone else's visits."
 ]
}