A save_lead tool the model calls once it has a name, contact and request, with server-side checks before anything is sent.
Answering questions is half the value. The other half is turning a visitor into a booking. The model collects details in conversation, then calls a tool. Your server, not the model, decides whether the details are good enough to send.
lib/tools.ts
export const SAVE_LEAD = {
name: "save_lead",
description: "Send a booking request or message to the owner. Only call once you have a name and an email or phone.",
input_schema: {
type: "object" as const,
properties: {
kind: { type: "string", enum: ["message", "booking"] },
name: { type: "string" },
email: { type: "string" },
phone: { type: "string" },
request: { type: "string", description: "What they want, incl. preferred day and time" },
},
required: ["kind", "name", "request"],
},
};
This lesson comes with a Velour plan
Every Academy lesson, code sample and Claude Code prompt is included with Publish and Growth, along with everything in the builder.