Asia/Kolkata. Substitute your own account, calendar address and numbers.
What you need
1
Connect Google Calendar
In the dashboard, go to Integrations → Add integration → Google Calendar and sign in as the account that owns the calendar. Then read the integration id and the tools it exposes:Nine tools come back, all approved on a fresh connection. See Google Calendar for each one’s arguments.
2
Approve only the tools this agent needs
Booking on the account’s primary calendar needs two:
suggest_time to find free periods and create_event to write the appointment. Every approved tool is described to the model on every turn, so fewer tools means fewer input tokens and fewer wrong choices. Shorten the namespace too, so the model sees calendar_suggest_time instead of google_calendar_suggest_time:allowed_toolstakes the tool’s own name (create_event), never the exposed one.- The prompt must use the exposed name (
calendar_create_event). allowed_toolsreplaces the list wholesale and applies to every agent attached to the integration on its next turn, without a republish.
3
Create the two tools of your own
record_booking writes the booked appointment into userdata, so it is readable for the rest of the call, stored on the call record, and visible to post-call analysis as an unambiguous tool call:transfer_to_reception reaches a person. Its description is the escalation policy:POST it to /v1/tools the same way. Publish both (POST /v1/tools/{tool_id}/publish) — an unpublished tool cannot be attached. See transfer.4
5
Create and publish the agent
Save the config as Fold in the prompt, create, validate and publish:
reception-agent.json, with your integration id and the two tool ids:mcpsis part of the published version: the calendar tools reach calls only after you publish.allowed_toolson the integration is live.clinic_emailhas adefaultbecause an inbound call supplies novars. Arequiredvar without a default makes assigning the agent to a number fail. See variables.
Test it
Book something, then check the calendar. Use the agent editor’s test panel (it runs the latest published version): give a name, a reason, “sometime Thursday morning”, and accept the first slot. In Google Calendar, confirm:- The event is at the time the agent said aloud. An hour off means a missing
timeZone. - The title is service and name.
- The duration matches the prompt.
GET /v1/calls/{session_id} returns:
- the
function_callitems forcalendar_suggest_timeandcalendar_create_event, with the arguments the model chose; session.userdatawith the fourbooking_*keys;session.analysisonce the call ends, withappointment_atmatching the calendar.
A web test call cannot exercise the transfer (
transfer is phone-only), and {{system_vars.human_phone_number}} is empty there, so the event description is blank. Test the failure path too: disable the integration and confirm the agent offers a person instead of claiming a booking.What to watch in the first week
- Offers, not lists. Read the turn after
calendar_suggest_timein a few transcripts. Two concrete times is the target; anything longer is a prompt fix. - Calls with no booking.
GET /v1/calls?outcome=failure, then groupnot_booked_reason. “No time suited” means the preferred hours are wrong; “calendar error” means read the tool results. - What the voice says. Listen to a few recordings: dates and times read wrongly are fixed in the SPEAKING section.
Limits of this setup
- No confirmation message. There is no SMS, and with no attendees Google emails nobody. Add the caller as an attendee (they must spell an email aloud), or post the booking to your own system from an
httptool. - No rescheduling or cancelling. That needs
search_eventsplusupdate_event/delete_eventapproved and prompted for. AneventIdfrom a search names one occurrence of a recurring event, not the series. - Two concurrent callers can be offered the same slot.
suggest_timereads free/busy when it runs and nothing holds the slot untilcreate_event; Google accepts both bookings. If double-booking is unacceptable, book through a system of yours that can hold a slot, from anhttptool. suggest_timetakes at most 50 addresses, and calendars Google will not share come back as unreadable.
Next
Google Calendar
All nine native tools, argument by argument.
Call analysis
Tune the extraction against a finished call.
Phone numbers
Put the agent on a number.