Recipes for AI agents using the Chat Thing MCP server
This page is written for AI agents (Claude, ChatGPT, Cursor, Codex and others) connected to the Chat Thing MCP server, and for people who want to see what their agent will do. Each recipe lists the tools to call, in order, and the checks that prove the job worked. Tool names match the tools reference.
If you're a person, you don't need to call these tools yourself. Paste a recipe's goal into your assistant, for example "Set up a support bot from https://help.example.com", and it will follow the steps.
Rules that apply to every recipe
- Check access first. Call
list_teams. Only teams wherecanWriteis true (the Owner or Admin role) allow tools that change something. Read tools work in any team the user belongs to. - Read before you write. Call
get_bot,list_power_upsorget_web_channelbefore changing them.update_power_upreplaces the wholeconfig, so write back every field you want to keep. - Fetch the schema before configuring. Power-ups, webhooks and the website widget follow
list_*_types, thenget_*_schema, then create or update. A rejected write lists the fields that failed plus the full schema, so fix those fields and retry once. - Don't retry creates blindly.
create_power_upandcreate_hookaren't deduplicated. If a call may have succeeded, checklist_power_upsorlist_hooksbefore calling it again. - Test chats are real chats. A chat opened with
start_chatappears in the team's Conversations, can fire the Conversation started webhook, runs the bot's power-ups for real (a handoff sends a real email) and spends the team's message tokens. Tell the user before testing a bot that has live power-ups or webhooks. - Only v2 bots can be changed.
get_botreturnsversion. Legacy v1 bots are read-only over MCP; ask the user to migrate them in the dashboard. - Ask before destructive calls.
delete_bot,delete_data_source,delete_power_upanddelete_hookcan't be undone. Get the user's explicit confirmation first. - Check the docs when unsure.
search_docsandget_docreturn these pages, so answer questions about plans, limits and settings from the docs rather than memory.
Set up a support bot from a website URL
Goal: a bot that answers from the user's help pages and cites them.
list_teams, and pick a team wherecanWriteis true. Ask the user if there's more than one.create_botwith anameand asystemMessagethat says what the bot is for, who it talks to, its tone, and what to do when the answer isn't in its knowledge. See Write your bot's instructions. Keep the returned botid.discover_pageswithmode: "sitemap"and the site's rooturl(orsitemapUrlif the sitemap isn't at/sitemap.xml). If there's no sitemap, usemode: "crawl"and polllist_discovered_pagesuntilstateisready.- Read the summary. Use
list_discovered_pageswith afilterto confirm the important sections (for example/helpor/docs) are there, and to spot pages to leave out (login pages, tag archives, legal pages). add_data_sourcewithtype: "WEB", thediscoveryId, andincludePatternsorexcludePatternsto narrow the pages. Patterns choose which pages;contentSelectorandcontentExcludeschoose which part of each page is read.- Poll
get_data_sourceuntilstateissyncedorsync_error. update_botwithenhancedRetrieval: trueandmaxContextAmountof 8 to 10. If the content is many short entries (FAQ one-liners, product rows), also setdocumentRelevanceto about 0.5. See Retrieval settings.update_botwithincludeSources: trueif the user wants answers to link to the pages they came from.- Add an escape hatch with the next recipe.
Checks
list_data_source_rowsshows the pages you expected, and none you excluded.start_chat, thensend_messagewith three questions whose answers you know are on the site. Each reply is correct and itssourcesarray lists the right page URLs.send_messagewith a question the site doesn't answer. The bot says it doesn't know and offers a next step, rather than guessing.- Give the user the
dashboardUrlfromcreate_botso they can try it, and point them to Install the chat widget.
Add a human-handoff escape hatch
Goal: when the bot can't help, or a customer asks for a person, the team gets an email with the conversation.
list_power_upsfor the bot. If atalkToAHumanpower-up already exists, update it instead of creating a second one.list_power_up_typesand confirmtalkToAHumanis offered.get_power_up_schemawithtype: "talkToAHuman".- Ask the user which address should receive handoffs. Leaving it empty sends them to the bot owner.
create_power_upwithtype: "talkToAHuman", adescriptionthat says when to hand off (for example "Use this when the customer asks for a person, or when you can't answer after two attempts. Ask for their email address first.") andconfig.notificationEmail.get_bot, thenupdate_botwith asystemMessagethat adds one line telling the bot to offer a person when it can't answer. Write the rest of the existing prompt back unchanged.- Optional: suggest the user turns on human takeover in the dashboard (Standard plan and above) so a teammate can reply inside the website chat. There's no MCP tool for it.
Checks
list_power_upsshows the power-up withenabled: true.- Only if the user agrees (it sends a real email):
start_chat, thensend_messagewith "Can I talk to a person?". The bot asks for an email address, and after you give a test address it confirms the handoff. - For a bot that also needs a form or a CRM record, see Hand off to a human and Call your API.
Review the last week's conversations and suggest instruction changes
Goal: find where the bot struggled and propose specific changes, without changing anything until the user agrees.
get_botto read the currentsystemMessageand retrieval settings.list_data_sourcesto see what the bot knows and when each source last synced.list_chatswithlimit: 100. Results are newest first withcreatedAtandmessageCount. Page withoffsetuntilcreatedAtis older than seven days. Skip chats you started yourself for testing.get_messagesfor each chat with more than one message. For long reviews, sample: every chat with 4 or more messages, plus a spread of short ones.- For each assistant reply, note:
- Replies that say the bot doesn't know, or apologise.
- Replies with an empty
sourcesarray on a question that should be in the knowledge (only meaningful whenincludeSourcesis on). - Customers repeating or rephrasing the same question, or asking for a person.
- Answers that are off-topic, too long or in the wrong language.
- Group the problems by cause, using the table in How your bot answers: missing knowledge, retrieval too strict or too loose, instructions, or model.
- Report to the user: each problem, two or three example chat IDs, the likely cause and the exact change you propose (new prompt wording, a page to add, a setting value).
- Only after the user approves:
update_botwith the newsystemMessageor settings, orupdate_data_sourceto add pages.
Checks
- Re-ask two or three of the failing questions with
start_chatandsend_message, and compare the new replies with the old ones. - On the Enterprise plan, save the failing questions as test cases (see the last recipe) so the fix is checked every time the bot changes.
get_messages doesn't include customer feedback, topics or sentiment. Those are in the dashboard: see Review customer conversations and Analytics.
Keep a website knowledge source fresh
Goal: the bot picks up edited pages, new pages and removed pages.
Re-syncing a website source fetches every page already in it again. It doesn't look for new pages, and it doesn't remove pages that have gone from the site.
list_data_sources, thenget_data_sourcefor the website source. CheckstateandlastSync.- Schedule automatic re-syncs:
update_data_sourcewithsyncIntervalset today,weekormonth(nullturns it off). Automatic syncing needs the Standard plan or above; see Keep your bot's knowledge up to date. - To find new pages:
discover_pageswithmode: "sitemap"for the same site. Then uselist_discovered_pagesandlist_data_source_rows(both accept afilter) to work out which discovered URLs aren't in the source yet. - To remove pages that no longer exist:
list_data_source_rows, find rows whosestateshows an error or whose URL has gone from the sitemap. Confirm the list with the user first. - One
update_data_sourcecall withaddUrlsset to only the new URLs andremoveRowIdsset to the rows to remove. Only include a field when it has items: an emptyaddUrlsorremoveRowIdsrejects the whole call. Don't commit the whole discovery again: existing URLs aren't skipped, so you'd add duplicates. Adding or removing rows starts a re-sync of the whole source, so don't callsync_data_sourceas well; pollget_data_sourceuntilstateissyncedorsync_error. - If nothing needed adding or removing,
sync_data_sourcerefreshes every page now. Pollget_data_sourcethe same way. - Optional, for sites that publish often:
list_hook_types,get_hook_schemaforStartSync, thencreate_hookwith the data source's id. Hooks are created turned off, so calltoggle_hook_enabledwithenabled: truebefore giving the user the trigger URL to add to their CMS publish webhook. The URL works like a password.
Checks
get_data_sourceshows a recentlastSyncandstate: synced.send_messagewith a question only a new or edited page answers, and check that page appears insources.- Syncing uses storage tokens for changed content only. If
update_data_sourceorsync_data_sourcefails with a storage token error, tell the user; see Storage tokens.
Run a test run and read the results
Goal: a repeatable check of the bot's answers. Tests are on the Enterprise plan; on other plans every test tool returns an upgrade message, so stop and tell the user.
list_test_casesfor the bot to see what exists.create_test_casefor each question worth protecting: aquestionplus achecksarray.- Answer checks:
factuality(thestatementis the fact the answer must agree with),similarity(thestatementis an example answer),requirements(thestatementlists what the answer must do) andrelevance.similarity,requirementsandrelevancetake athresholdfrom 0 to 1; start at 0.7. - Power-up checks:
powerUpCalled,powerUpNotCalledandpowerUpSucceeded. Thestatementis the power-up's id or name.
- Answer checks:
start_test_runwith an optionalname. It needs at least one test case and returns atestRunId.- Poll
get_test_rununtilstateiscompleteorfailed. If it staysrunningfar longer than the number of cases suggests, report it as stuck instead of polling forever. - Read each case: the question, the bot's response, response time, tokens, and each check's pass result, score and reason.
Checks
- For each failed check, read the
reason. If the answer is actually fine, thestatementorthresholdis too strict. If the answer is wrong, diagnose it like any bad answer: see Improve your bot's answers. - Runs use the bot's live settings at the time they run, so run once before a change for a baseline, then again after.
- Test runs use message tokens for the bot's answers and for grading. See Test your bot's answers.
Next steps
Related
- What your AI assistant can do in Chat Thing
Every tool the Chat Thing MCP server gives your AI assistant, from creating bots and adding knowledge to webhooks, tests and conversations.
- Build a bot with your AI assistant
Go from one prompt to a tested support bot using your AI assistant and the Chat Thing MCP server, and learn what a good build looks like.
- How your bot answers a message
What happens between a customer's message and your bot's reply, why answers go wrong, and which setting or page fixes each problem.
Last updated