Guides
Forms and sign-in inside the chat
Ask for missing details as a card with real fields instead of a list to type, and let visitors sign in to your site without leaving the conversation.
On this page
Busymate AI can ask for what it is missing as a form card — labelled fields and one button, inside the conversation — instead of writing "I'll need: 1. your name 2. your phone number". On a phone that difference is the whole experience: the right keyboard per field, the visitor's own autofill, and nothing to remember. The same card is how a visitor signs in to your site without leaving the chat.
1. Decide which action needs details
Any action the visitor asks for that you cannot complete from what they said: a booking that needs a name and a phone number, an order lookup that needs the order number, a return that needs a reason. Write down the fields, their types, and which are required.
2. Answer with a card instead of a result
A tool asks for a form by returning one, in place of its answer:
BusymateAI.registerPageTools([
{
name: "book_table",
description: "Book a table. Call with no arguments to show the booking form.",
inputSchema: { type: "object", properties: {} },
annotations: { readOnlyHint: false },
async execute(input) {
// No details yet? Ask for them as a CARD, not as a sentence.
if (!input?.name) {
return {
$bmForm: 1,
title: "Book a table",
description: "Two minutes and you're done.",
fields: [
{ name: "name", label: "Your name", type: "text", required: true, autocomplete: "name" },
{ name: "phone", label: "Phone", type: "tel", required: true, autocomplete: "tel" },
{ name: "party", label: "People", type: "number", min: 1, max: 12 },
{ name: "time", label: "Time", type: "time" },
],
submit: { label: "Book it", tool: "book_table" },
cancel: { label: "Not now" },
};
}
// Submitted: the same tool, now with the visitor's values.
const response = await fetch("/api/bookings", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify(input),
});
return response.ok ? await response.json() : { error: "could_not_book" };
},
},
]);Answer with $bmForm: 1 and a fields array. submit.tool names where the values go — usually the same tool, now with arguments. A field type is text, , , , , , , or , with optional , , , , /, and for a select. Twelve fields at most.
Questions
Does the assistant see what the visitor types?
Only for an ordinary form, where the values become a visible message — which is what a booking or an order number should be. A card that submits into your own page never shows its values to the assistant, and a
passwordfield is only accepted on that kind of card.What if my tool returns something that is not a form?
Nothing changes. The card only renders for a result that positively declares
$bmForm: 1with at least one usable field; everything else shows as it always has.Can I use it without WebMCP page tools?
Yes. A connected MCP server declares the same object at
_meta.ui.form, and the platform's own card needs nothing from you at all.