Skip to content
Truffl.
Browse chapters

MCP documentation Connectors

Bot Builder MCP

Create, edit and test a Truffl agent candidate from chat, then review changes in Truffl.

Draft and configure

Configure the agent using the supported typed fields. Candidate edits carry an expected revision. If someone changes the draft in Truffl, reload it, compare the diff and reapply your edit to the current revision.

Use the native Builder for provider controls, phone routing, publication, or any setting that the model cannot find in the connected tool catalogue.

TaskTool or workflow
Find an agent and its current revisionlist_agents, inspect_agent, read_agent_configuration_field
Create and edit an unpublished draftcreate_agent_draft, save_agent_draft
Inspect valid model, voice and setting choiceslist_setting_options, list_voice_options

Read and edit the agent’s procedures

  1. Inspect the agent and read procedures in its saved or draft configuration. Compare its ordered steps, triggers and tool references with Settings → Pathways. The current prompt mode tells you whether these instructions contribute to the agent policy. System prompt only excludes them.
  2. With Bot Builder access, ask to stage the full ordered procedures list on the current candidate. Each step can ask, tell, say, check a condition or reference a configured tool. Read the diff and preview a synthetic test of this revision. Omit procedures when editing other fields. An empty list proposes clearing all procedures.
  3. An owner with Admin Runtime access approves a tested procedure change in Truffl and reviews any later restoration. For a real call, use Evals to see the saved transcript and tool receipts. An authored step alone provides no evidence that the call followed it.
Example prompt
Read the procedures on my test agent. On its candidate, add a step to ask which day the caller prefers, preserve the other steps, and show the diff. Leave it unpublished.

Run saved HTTPS tools on call events

  1. Ask Builder to inspect the agent and list the workspace’s saved HTTPS tool revisions. Choose the event and the revisions you want to use.
  2. Ask it to stage a single event binding or an ordered sequence. A sequence can run at call start, completion or when results are ready. A later step can use an earlier step’s response or run only when that step succeeds.
  3. Inspect the candidate and open its review link. The chat shows the event, revisions, step order, conditional steps and fallback. Review the exact conditions and field mappings in Truffl before publication.
  4. After approval, verify the workflow with a new controlled call. Compare each step’s delivery evidence with the receiving system’s receipt. Earlier calls are excluded from newly activated bindings.
Example prompt
On the test agent, stage a results-ready sequence using my saved tools. First look up the order, then save the follow-up only if the lookup succeeds. Show the tool revisions and leave the draft unpublished.

Require a tool outcome before speaking specific words

  1. Choose a bound HTTPS tool revision and a response field that establishes the outcome. Stage outcomeSpeech with the exact field, typed expected value, up to 16 restricted phrases and an optional fallback. Add each wording and language you need to cover.
  2. When a complete bot reply contains one of those phrases, Truffl looks for a fresh matching tool receipt from this turn. An HTTP 200, a mock, a previous turn or multiple matching attempts leaves the restriction in force. Other free-form wording, including paraphrases, can still be spoken.
  3. The rule waits for complete replies before synthesis. Check first-audio latency on the browser and a controlled handset. Test a missing or false field, then a matching field in a fresh tool call. Compare the audible reply with its transcript and tool receipt in Evals.
Example prompt
Stage a rule on this candidate: only allow ‘your booking is confirmed’ once the pinned booking tool returns boolean saved=true. Otherwise say ‘Let me check the booking status.’ Show me the rule and the draft revision.

Preview, run and compare

  1. Call preview_draft_test for the intended revision and scenario. Review the plan before you select run_draft_test.
  2. If the Simulations API is off, a full owner uses get_simulations_api and set_simulations_api to request enablement. Confirm the model-spend step in Truffl. Turning the switch off blocks new model-backed runs.
  3. Check the run using get_draft_test or compare two completed runs with compare_draft_tests. Use the same inputs for a baseline and a candidate. Compare request counts and the transcript before you decide.
Example prompt
Preview a text test of this exact saved draft. A customer asks for a refund and then asks for a human. Show the pinned revision and request ceiling before running.

Review changes before publishing

Ask for prepare_publication_review using the candidate revision and passing test run ID. Review that exact change through its link in Truffl. Once the owner approves, ask for get_publication_receipt using the source agent ID and draft revision.

To restore a current in-place release, ask for prepare_rollback_review with the source agent and publication IDs. After owner approval, check that the same publication receipt shows reverted. A native version receipt confirms creation. Check the assigned version in Truffl to verify routing.

Builder can also prepare a single-use approved HTTPS tool probe, list STT options for advanced speech settings, run repeatable draft test suites and review pinned inbound routing. Each change still goes through review in Truffl.

  1. Prepare in chatChoose the exact resource or revision
  2. Review in TrufflCheck scope, changes and spend
  3. Confirm and verifyRead the saved state or receipt
Read the saved result after confirmation.