io.github.basilalshukaili/agent-broker
AI agents find and book with SMBs. 13 MCP tools, TCPA/GDPR/CASL compliance.
Given criteria (vertical, location, capability, price band, availability window), return ranked candidate SMBs from the verified supply network. Returns only curated, verified, transactable businesses — not raw directory results. EXAMPLE USER QUERIES THAT MATCH THIS TOOL: user: "Find me a salon in Tokyo that does color" -> call find_business({"vertical": "personal_services", "location": {"zip_or_city": "Tokyo"}, "capability": "color"}) user: "I need a plumber near 30309" -> call find_business({"vertical": "home_services", "location": {"zip_or_city": "30309"}, "capability": "plumbing"}) user: "Show me dentists in London" -> call find_business({"vertical": "professional_services", "location": {"zip_or_city": "London"}, "capability": "dentist"}) WHEN TO USE: Use when an agent needs to identify which SMBs can fulfill a business task (booking, service, consultation) in a given location and vertical. Call this before schedule_appointment or send_message when you do not yet have a specific SMB target. WHEN NOT TO USE: Do not use as a general directory or browsing surface. Do not use when you already have a specific verified SMB identifier. Do not use for verticals outside personal services, home services, and local professional services. COST: $varies per_call LATENCY: ~variesms
Confirm that an SMB is real, currently operating, and capable of the requested service. Performs a live capability probe against the business's channel. EXAMPLE USER QUERIES THAT MATCH THIS TOOL: user: "Confirm smb_imp_abc actually does emergency plumbing" -> call verify_business({"smb_id": "smb_imp_abc", "capability_to_verify": "emergency_plumbing"}) WHEN TO USE: Use before sending communications or scheduling if you have an unverified SMB identifier, or if the agent's task requires confirmed capability (e.g., 'I need to be sure they do emergency plumbing'). WHEN NOT TO USE: Do not use if the SMB was returned from find_business within the last 24 hours — those results are already verified. COST: $varies per_call LATENCY: ~variesms
Send an outbound message to an SMB or its customer across channels (SMS, email, chat, voice, push). Channel is abstracted — you specify intent and recipient; the service selects and falls back across channels. EXAMPLE USER QUERIES THAT MATCH THIS TOOL: user: "Text the salon I'll be 10 minutes late" -> call send_message({"recipient_id": "smb_xyz", "channel_preference": "sms", "message": {"body": "Will be 10 minutes late."}, "country_code": "US"}) user: "Email the dentist about insurance" -> call send_message({"recipient_id": "smb_xyz", "channel_preference": "email", "message": {"body": "Do you accept Cigna?"}}) WHEN TO USE: Use for outbound business communication: appointment reminders, follow-ups, marketing offers (with confirmed opt-in), transactional messages, or inbound response handling. WHEN NOT TO USE: Do not use for OTP or critical transactional confirmations — use send_transactional_confirmation instead. Do not use for recipients without consent where required (SMS marketing, EU recipients). COST: $varies per_message LATENCY: ~variesms EXECUTION: sync_fast (use get_outcome to retrieve result)
Structured intake of a prospect into an SMB's funnel with validation, enrichment hooks, and deduplication. Inserts into the SMB's CRM or direct-booking pipeline if available. EXAMPLE USER QUERIES THAT MATCH THIS TOOL: user: "Tell smb_xyz I'm interested and want a callback" -> call capture_lead({"smb_id": "smb_xyz", "prospect": {"name": "Jane", "phone": "+15551234567", "email": "jane@example.com"}, "source": "agent"}) WHEN TO USE: Use when a potential customer has expressed interest in an SMB's service and you want to ensure they are registered in the SMB's pipeline for follow-up. WHEN NOT TO USE: Do not use for confirmed bookings — use schedule_appointment. Do not use for bulk list imports. COST: $varies per_lead LATENCY: ~variesms EXECUTION: sync_fast (use get_outcome to retrieve result)
Availability lookup, hold, confirm, reschedule, or cancel appointments with an SMB. Routes through the SMB's native booking system if available, falls back to voice AI or web form. EXAMPLE USER QUERIES THAT MATCH THIS TOOL: user: "Book the haircut for next Tuesday at 3pm" -> call schedule_appointment({"smb_id": "smb_imp_abc", "action": "book", "service": "haircut"}) user: "Cancel my Friday appointment at smb_xyz" -> call schedule_appointment({"smb_id": "smb_xyz", "action": "cancel"}) user: "Reschedule my dental cleaning to next week" -> call schedule_appointment({"smb_id": "smb_imp_xyz", "action": "reschedule"}) WHEN TO USE: Use when an agent needs to book, reschedule, or cancel a specific appointment with a specific SMB. Requires a verified smb_id. WHEN NOT TO USE: Do not use for bulk scheduling. Do not use without a verified SMB — call find_business and verify_business first if needed. COST: $varies per_booking_attempt LATENCY: ~variesms EXECUTION: async_by_default (use get_outcome to retrieve result)
Idempotent transactional messages: OTPs, booking confirmations, payment receipts, cancellation notices. Guaranteed delivery via redundant channels. EXAMPLE USER QUERIES THAT MATCH THIS TOOL: user: "Send the booking confirmation receipt to my email" -> call send_transactional_confirmation({"recipient_id": "user@example.com", "channel_preference": "email", "confirmation_type": "booking"}) WHEN TO USE: Use for any message that MUST be delivered reliably — OTPs, booking confirmations, receipts. Do not use for marketing. WHEN NOT TO USE: Do not use for marketing or promotional messages. Do not use for conversational messages. COST: $varies per_message LATENCY: ~variesms EXECUTION: sync_fast (use get_outcome to retrieve result)
Receive, classify, and route inbound messages on behalf of an SMB. Classifies intent (booking request, cancellation, inquiry, complaint), enriches with context, and routes to the appropriate handler or escalation path. EXAMPLE USER QUERIES THAT MATCH THIS TOOL: user: "Process this customer reply for me: 'Yes I want to book Tuesday'" -> call handle_inbound({"raw_message": "Yes I want to book Tuesday", "channel": "sms"}) WHEN TO USE: Use when an SMB needs inbound message triage — classifying incoming contact-form submissions, SMS replies, voicemails, or email inquiries. WHEN NOT TO USE: Do not use for outbound communications. Do not use for compliance-flagged recipient lists without verified opt-in records. COST: $varies per_inbound LATENCY: ~variesms EXECUTION: async_by_default (use get_outcome to retrieve result)
Hand off an in-flight task to a human operator with a full context bundle: transcript, prior actions, identifiers, and a recommended next step. EXAMPLE USER QUERIES THAT MATCH THIS TOOL: user: "I'm stuck — get a human at smb_xyz to call me back" -> call escalate_to_human({"smb_id": "smb_xyz", "reason": "agent_blocked", "summary": "Cannot resolve via automated channels"}) WHEN TO USE: Use when automated resolution has failed after channel-fallback exhaustion, when the task requires human judgment, or when the customer has explicitly requested human contact. WHEN NOT TO USE: Do not use as a first resort. Escalate only after automated resolution attempts. COST: $varies per_escalation LATENCY: ~variesms EXECUTION: async_by_default (use get_outcome to retrieve result)
Query the current state of any in-flight async operation by operation_id. WHEN TO USE: Use to poll the state of a pending_async operation when no webhook callback has arrived or to check progress. WHEN NOT TO USE: Do not poll more frequently than once per 10 seconds — use webhook delivery for real-time updates instead. COST: $varies per_call LATENCY: ~variesms
Retrieve the final OutcomeReceipt for a completed operation. WHEN TO USE: Use after get_status returns success/failure/partial to retrieve the full result with cost and reason codes. WHEN NOT TO USE: Do not use for operations still in pending/executing state — use get_status first. COST: $varies per_call LATENCY: ~variesms
Return an expected cost estimate, latency estimate, and success-probability estimate for a proposed call before execution. Accuracy SLO: actual cost within ±5% of preview. EXAMPLE USER QUERIES THAT MATCH THIS TOOL: user: "How much will this SMS cost me?" -> call preview_cost({"operation": "send_message", "params": {"channel_preference": "sms"}}) user: "Estimate the cost of booking via voice fallback" -> call preview_cost({"operation": "schedule_appointment"}) WHEN TO USE: Use before any operation when the agent is operating under a budget constraint and needs to decide whether to proceed. WHEN NOT TO USE: Do not use in a hot loop — cache the result for at least 60 seconds if repeating the same preview. COST: $varies per_call LATENCY: ~variesms
Live capability probe that verifies the service is healthy, each claimed operation is reachable, and supply network size is current. Use to verify integration before production use. EXAMPLE USER QUERIES THAT MATCH THIS TOOL: user: "Run a health check before I send the broadcast" -> call self_test({}) WHEN TO USE: Use at agent startup, before high-stakes task sequences, or after receiving unexpected errors to check if the service is degraded. WHEN NOT TO USE: Do not call more than once per minute in production. COST: $varies free LATENCY: ~variesms
Turn ANY public booking URL (Cal.com, Calendly, Doctolib, Booksy, Fresha, OpenTable, Setmore, Square, Acuity, Schedulista, Squarespace, BookMyCity) into a callable smb_id you can immediately use with schedule_appointment, send_message, or capture_lead. Idempotent — calling twice returns the same smb_id. EXAMPLE USER QUERIES THAT MATCH THIS TOOL: user: "Book me a haircut at https://cal.com/jane-salon" -> call import_booking_url({"booking_url": "https://cal.com/jane-salon", "vertical": "personal_services"}) -> then schedule_appointment({"smb_id": "<from_above>", "action": "book"}) user: "Schedule with this dentist: https://www.doctolib.fr/dentiste/paris/jean-dupont" -> call import_booking_url({"booking_url": "https://www.doctolib.fr/dentiste/paris/jean-dupont"}) user: "Reserve a table at https://www.opentable.com/r/acme-bistro" -> call import_booking_url({"booking_url": "https://www.opentable.com/r/acme-bistro", "vertical": "restaurants"}) WHEN TO USE: Call this FIRST whenever the user provides a specific booking URL (cal.com/handle, calendly.com/handle/event, doctolib.fr/..., booksy.com/..., opentable.com/r/..., etc.). User patterns that match: 'book me at https://cal.com/...', 'schedule with calendly.com/jane/intro', 'reserve a table at opentable.com/r/...', 'I want to book this dentist: https://www.doctolib.fr/...'. After importing, the returned smb_id can be passed straight to schedule_appointment. WHEN NOT TO USE: Do not use if the user only describes a business by name without a URL — call find_business instead. Do not use for arbitrary websites that are not on the supported booking-platform list (use /supply/platforms to see all 12). COST: $0.005 per_call LATENCY: ~600ms
| Timestamp | Status | Latency | Conformance |
|---|---|---|---|
| May 7, 2026 | success | 85.1ms | Pass |
| May 6, 2026 | success | 105.8ms | Pass |
| May 6, 2026 | success | 65.4ms | Pass |