{
  "tools": [
    {
      "name": "find_open_slots",
      "title": "Find open times across businesses",
      "description": "Find businesses that are actually open for a service in a time window, across every business on Cubstack, in one call. Each result has a verified price and open times checked live with the business just now, plus how to book. Use this for requests like \"a haircut under $40 at 1pm today near Silver Lake\". also_nearby lists businesses that aren't connected (no live times; give your user their own booking link).",
      "parameters": {
        "type": "object",
        "required": [
          "service",
          "start_after",
          "start_before"
        ],
        "properties": {
          "service": {
            "type": "string",
            "description": "What the person wants, e.g. \"haircut\", \"manicure\", \"massage\""
          },
          "max_price": {
            "type": "integer",
            "description": "Highest price in minor units (4000 = $40.00)"
          },
          "start_after": {
            "type": "string",
            "format": "date-time",
            "description": "Earliest start time (ISO 8601)"
          },
          "start_before": {
            "type": "string",
            "format": "date-time",
            "description": "Latest start time (ISO 8601)"
          },
          "city": {
            "type": "string",
            "description": "A metro name such as \"Los Angeles\" or \"LA\" covers the whole county (Santa Monica, Pasadena, Long Beach…); other names match that city."
          },
          "postal_code": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 25
          }
        }
      },
      "annotations": {
        "title": "Find open times across businesses",
        "readOnlyHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "find_businesses",
      "title": "Find businesses",
      "description": "Find local businesses that can take orders, bookings or inquiries directly — haircuts, bakeries, cleaners, clinics and more. Returns each business with its best-matching offers. Use this first, then pass `business` to the other tools. `not_on_cubstack` lists nearby businesses that haven't joined: you can't book them here, but you can give your user their own booking link or phone number. Have only a phone number? Pass `phone` before calling the business: if it's on Cubstack you can book it here instead of placing a call.",
      "parameters": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "description": "A US or Canadian business phone number, e.g. \"(562) 555-0142\". Finds the business with that number; other fields are ignored."
          },
          "query": {
            "type": "string",
            "description": "What the person wants, e.g. \"haircut\", \"sourdough\", \"custom cake\""
          },
          "city": {
            "type": "string",
            "description": "A metro name such as \"Los Angeles\" or \"LA\" covers the whole county (Santa Monica, Pasadena, Long Beach…); other names match that city."
          },
          "postal_code": {
            "type": "string"
          },
          "vertical": {
            "enum": [
              "food_and_drink",
              "health_and_beauty",
              "home_services",
              "appointments",
              "retail"
            ]
          },
          "action": {
            "enum": [
              "checkout",
              "book",
              "quote",
              "lead"
            ],
            "description": "Only businesses that allow this"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20
          }
        }
      },
      "annotations": {
        "title": "Find businesses",
        "readOnlyHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "request_unlisted_business",
      "title": "Pass a request to a business that isn’t on Cubstack",
      "description": "For a business in `not_on_cubstack` (it can't be booked here): pass your user's request (service, preferred time, contact) to the business, so it can get back to them. Ask your user first whether you may share their request and contact details with the business, and send customer_agreed: true only if they said yes. This is not a booking: still give your user the business's own booking link right away.",
      "parameters": {
        "type": "object",
        "required": [
          "business",
          "customer",
          "customer_agreed"
        ],
        "properties": {
          "business": {
            "type": "string",
            "description": "The `business` id from not_on_cubstack"
          },
          "service": {
            "type": "string",
            "description": "What your user wants, e.g. \"balayage\""
          },
          "preferred_time": {
            "type": "string",
            "description": "When, in plain words, e.g. \"Thursday after 2pm\""
          },
          "customer": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              }
            }
          },
          "customer_agreed": {
            "type": "boolean",
            "description": "true only if your user said yes to sharing their request and contact details with the business"
          }
        }
      },
      "annotations": {
        "title": "Pass a request to a business that isn’t on Cubstack",
        "readOnlyHint": false,
        "destructiveHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "get_business_info",
      "title": "Get business details",
      "description": "Business profile, locations, hours, policies (returns, cancellation), and what agents may do here.",
      "parameters": {
        "type": "object",
        "properties": {
          "business": {
            "type": "string",
            "description": "Business id from find_businesses (e.g. \"bloom-hair-studio\")"
          }
        },
        "required": [
          "business"
        ]
      },
      "annotations": {
        "title": "Get business details",
        "readOnlyHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "search_offers",
      "title": "Search services and items",
      "description": "Search products, menu items and bookable services with live price and availability.",
      "parameters": {
        "type": "object",
        "properties": {
          "business": {
            "type": "string",
            "description": "Business id from find_businesses (e.g. \"bloom-hair-studio\")"
          },
          "query": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "product",
              "service",
              "food"
            ]
          },
          "category": {
            "type": "string"
          },
          "max_price": {
            "type": "integer",
            "description": "minor units"
          },
          "limit": {
            "type": "integer"
          }
        },
        "required": [
          "business"
        ]
      },
      "annotations": {
        "title": "Search services and items",
        "readOnlyHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "get_offer",
      "title": "Get service or item details",
      "description": "Full detail for one offer, including modifier options.",
      "parameters": {
        "type": "object",
        "required": [
          "business",
          "offer_id"
        ],
        "properties": {
          "business": {
            "type": "string",
            "description": "Business id from find_businesses (e.g. \"bloom-hair-studio\")"
          },
          "offer_id": {
            "type": "string"
          }
        }
      },
      "annotations": {
        "title": "Get service or item details",
        "readOnlyHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "check_availability",
      "title": "Check open times",
      "description": "Open appointment slots for a bookable service.",
      "parameters": {
        "type": "object",
        "required": [
          "business",
          "offer_id"
        ],
        "properties": {
          "business": {
            "type": "string",
            "description": "Business id from find_businesses (e.g. \"bloom-hair-studio\")"
          },
          "offer_id": {
            "type": "string"
          },
          "start_at": {
            "type": "string",
            "format": "date-time"
          },
          "end_at": {
            "type": "string",
            "format": "date-time"
          },
          "team_member_id": {
            "type": "string"
          }
        }
      },
      "annotations": {
        "title": "Check open times",
        "readOnlyHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "get_quote",
      "title": "Get a price quote",
      "description": "Price a basket (tax included) with a 15-minute price guarantee, or request a custom quote for variable-priced work.",
      "parameters": {
        "type": "object",
        "required": [
          "business",
          "items"
        ],
        "properties": {
          "business": {
            "type": "string",
            "description": "Business id from find_businesses (e.g. \"bloom-hair-studio\")"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "offer_id"
              ],
              "properties": {
                "offer_id": {
                  "type": "string"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": 1
                },
                "modifier_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "details": {
            "type": "string"
          },
          "contact": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "postal_code": {
                "type": "string"
              }
            }
          }
        }
      },
      "annotations": {
        "title": "Get a price quote",
        "readOnlyHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "place_hold",
      "title": "Hold a time or item briefly",
      "description": "Temporarily reserve stock or an appointment slot while the principal decides (requires a registered agent).",
      "parameters": {
        "type": "object",
        "required": [
          "business",
          "offer_id"
        ],
        "properties": {
          "business": {
            "type": "string",
            "description": "Business id from find_businesses (e.g. \"bloom-hair-studio\")"
          },
          "offer_id": {
            "type": "string"
          },
          "quantity": {
            "type": "integer"
          },
          "start_at": {
            "type": "string"
          },
          "team_member_id": {
            "type": "string"
          },
          "ttl_seconds": {
            "type": "integer"
          }
        }
      },
      "annotations": {
        "title": "Hold a time or item briefly",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "create_checkout",
      "title": "Order and pay",
      "description": "Buy items. With a valid mandate and a Square card source the payment completes autonomously; otherwise returns a Square checkout link for the human to pay.",
      "parameters": {
        "type": "object",
        "required": [
          "business",
          "items"
        ],
        "properties": {
          "business": {
            "type": "string",
            "description": "Business id from find_businesses (e.g. \"bloom-hair-studio\")"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "offer_id"
              ],
              "properties": {
                "offer_id": {
                  "type": "string"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": 1
                },
                "modifier_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "buyer": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "postal_code": {
                "type": "string"
              }
            }
          },
          "quote_id": {
            "type": "string"
          },
          "hold_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fulfillment": {
            "type": "object",
            "properties": {
              "pickup_at": {
                "type": "string"
              }
            }
          },
          "payment": {
            "type": "object",
            "properties": {
              "method": {
                "enum": [
                  "payment_link",
                  "square_source"
                ]
              },
              "source_id": {
                "type": "string"
              }
            }
          },
          "mandate": {
            "type": "object",
            "description": "Principal-signed mandate {mandate, signature}. Required for autonomous payment/booking; without it the action is routed to the human for confirmation."
          },
          "callback_url": {
            "type": "string"
          }
        }
      },
      "annotations": {
        "title": "Order and pay",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "book_appointment",
      "title": "Book an appointment",
      "description": "Book a service slot. Without a mandate, returns a confirmation link for the human.",
      "parameters": {
        "type": "object",
        "required": [
          "business",
          "offer_id",
          "start_at",
          "customer"
        ],
        "properties": {
          "business": {
            "type": "string",
            "description": "Business id from find_businesses (e.g. \"bloom-hair-studio\")"
          },
          "offer_id": {
            "type": "string"
          },
          "start_at": {
            "type": "string"
          },
          "team_member_id": {
            "type": "string"
          },
          "customer": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "postal_code": {
                "type": "string"
              }
            }
          },
          "vehicle": {
            "type": "object",
            "description": "For auto services: the customer’s car",
            "properties": {
              "year": {
                "type": "integer"
              },
              "make": {
                "type": "string"
              },
              "model": {
                "type": "string"
              },
              "vin": {
                "type": "string",
                "description": "17 characters, if known"
              }
            }
          },
          "pet": {
            "type": "object",
            "description": "For pet grooming: the customer’s pet (groomers need at least its name and species)",
            "properties": {
              "name": {
                "type": "string"
              },
              "species": {
                "enum": [
                  "dog",
                  "cat",
                  "other"
                ]
              },
              "breed": {
                "type": "string"
              },
              "weight_lbs": {
                "type": "number"
              }
            }
          },
          "note": {
            "type": "string"
          },
          "hold_id": {
            "type": "string"
          },
          "mandate": {
            "type": "object",
            "description": "Principal-signed mandate {mandate, signature}. Required for autonomous payment/booking; without it the action is routed to the human for confirmation."
          },
          "callback_url": {
            "type": "string"
          }
        }
      },
      "annotations": {
        "title": "Book an appointment",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "reschedule_booking",
      "title": "Move a booking to another time",
      "description": "Move a booking this agent made to another open time for the same service (call check_availability first). The booking keeps its place: nothing is cancelled. Price and policy stay the same.",
      "parameters": {
        "type": "object",
        "required": [
          "action_id",
          "start_at"
        ],
        "properties": {
          "business": {
            "type": "string",
            "description": "Business id from find_businesses (e.g. \"bloom-hair-studio\")"
          },
          "action_id": {
            "type": "string"
          },
          "start_at": {
            "type": "string",
            "format": "date-time",
            "description": "The new start time, from check_availability"
          },
          "team_member_id": {
            "type": "string",
            "description": "Optional: a specific staff member, from check_availability"
          }
        }
      },
      "annotations": {
        "title": "Move a booking to another time",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "cancel_booking",
      "title": "Cancel a booking",
      "description": "Cancel a booking this agent made. Cancellation policy applies.",
      "parameters": {
        "type": "object",
        "required": [
          "action_id"
        ],
        "properties": {
          "business": {
            "type": "string",
            "description": "Business id from find_businesses (e.g. \"bloom-hair-studio\")"
          },
          "action_id": {
            "type": "string"
          }
        }
      },
      "annotations": {
        "title": "Cancel a booking",
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "submit_lead",
      "title": "Send the business an inquiry",
      "description": "Send the business a qualified inquiry (custom work, estimates, callbacks). Requires the principal's consent to share contact details.",
      "parameters": {
        "type": "object",
        "required": [
          "business",
          "contact",
          "consent"
        ],
        "properties": {
          "business": {
            "type": "string",
            "description": "Business id from find_businesses (e.g. \"bloom-hair-studio\")"
          },
          "contact": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "postal_code": {
                "type": "string"
              }
            }
          },
          "intent": {
            "type": "string"
          },
          "details": {
            "type": "string"
          },
          "budget": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "integer"
              },
              "currency": {
                "type": "string"
              }
            }
          },
          "offer_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "consent": {
            "type": "boolean"
          },
          "mandate": {
            "type": "object",
            "description": "Principal-signed mandate {mandate, signature}. Required for autonomous payment/booking; without it the action is routed to the human for confirmation."
          },
          "callback_url": {
            "type": "string"
          }
        }
      },
      "annotations": {
        "title": "Send the business an inquiry",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "get_action_status",
      "title": "Check a booking or order",
      "description": "Current status of an action (checkout, booking, lead) this agent created.",
      "parameters": {
        "type": "object",
        "required": [
          "action_id"
        ],
        "properties": {
          "business": {
            "type": "string",
            "description": "Business id from find_businesses (e.g. \"bloom-hair-studio\")"
          },
          "action_id": {
            "type": "string"
          }
        }
      },
      "annotations": {
        "title": "Check a booking or order",
        "readOnlyHint": true,
        "openWorldHint": false
      }
    }
  ]
}