---
title: "Call flows"
description: "Prompts, in-call API tools, post-call analysis, drafts and lifecycle of simple (prompt) call flows."
---

> **For AI agents:** the complete documentation index is at [llms.txt](https://docs.trillet.ai/llms.txt). Append `.md` to any page URL for its markdown version.

{/* Generated by packages/mcp/scripts/gen-tool-reference.mjs from @trillet-ai/mcp v0.10.0. Do not edit by hand. */}

Prompts, in-call API tools, post-call analysis, drafts and lifecycle of simple (prompt) call flows. 13 tools.

## `trillet_list_call_flows`

**List call flows**

List all call flows (pathways) in the workspace with compact summaries.

Flags: `read-only` `structured output`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace_id` | string | no | Run this call in another workspace: its id or its name (see trillet_list_workspaces). Omit to use the default (TRILLET_WORKSPACE_ID, the workspace picked when the connector was approved, or the one set with trillet_switch_workspace). |

### Structured output

Returned as `structuredContent` (fields are optional; the same data is in the text result, where it is a bare array):

| Field | Type | Description |
| --- | --- | --- |
| `callFlows` | object[] |  |

## `trillet_get_call_flow`

**Get call flow**

Fetch one call flow. IMPORTANT: if the flow has an active editor draft, this endpoint returns the DRAFT merged over production, and test calls also run the draft. The response includes a has_active_draft flag; use trillet_deactivate_drafts to return to production.

Flags: `read-only` `structured output`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `flow_id` | string | yes |  |
| `include_prompt` | boolean | no | true returns the full prompt text (can be long) Default: `false`. |
| `workspace_id` | string | no | Run this call in another workspace: its id or its name (see trillet_list_workspaces). Omit to use the default (TRILLET_WORKSPACE_ID, the workspace picked when the connector was approved, or the one set with trillet_switch_workspace). |

### Structured output

Returned as `structuredContent` (fields are optional; the same data is in the text result):

| Field | Type | Description |
| --- | --- | --- |
| `id` | string |  |
| `name` | string |  |
| `direction` | string |  |
| `promptType` | string |  |
| `agentId` | string |  |
| `promptLength` | number |  |
| `inCallApiTools` | string[] |  |
| `knowledgeBases` | any[] |  |
| `postCallAnalysisFields` | string[] |  |
| `settings` | object |  |
| `hasActiveDraft` | boolean |  |
| `updatedAt` | string |  |
| `has_active_draft` | boolean |  |
| `inCallApiToolsFull` | any |  |
| `dynamicVariableCollections` | any |  |
| `prompt` | string |  |

## `trillet_create_call_flow`

**Create call flow**

Create a new call flow. GOTCHA: on CREATE, a partial `settings` object replaces ALL defaults, so this tool intentionally does not accept settings; create first, then configure with the update tools (updates deep-merge safely).

Flags: `writes`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes |  |
| `direction` | "outbound" \| "bidirectional" | no | bidirectional answers inbound calls (there is no separate inbound mode: the platform stores inbound as bidirectional); outbound is dial-out only Default: `"bidirectional"`. |
| `prompt` | string | no |  |
| `agent_id` | string | no | Link to an existing agent |
| `workspace_id` | string | no | Run this call in another workspace: its id or its name (see trillet_list_workspaces). Omit to use the default (TRILLET_WORKSPACE_ID, the workspace picked when the connector was approved, or the one set with trillet_switch_workspace). |

## `trillet_update_call_flow`

**Update call flow (advanced)**

Partial update of any call-flow fields. Merge semantics (verified): objects DEEP-MERGE (sending settings.callSetting.x preserves siblings), but ARRAYS REPLACE WHOLESALE (webhooks, transfers, postCallAnalysis must be sent complete), and null values are ignored (you cannot null a field). Prefer the dedicated tools for prompt, in-call APIs, and post-call analysis. Top-level settings toggles reachable ONLY through this tool: settings.enableHumanLikeVoiceAndTone (expressive delivery), settings.enableTransferInstructions and settings.enableEndCallInstructions (whether the transfer / end-call prompt blocks are injected; both default on), settings.customerLocation (IANA timezone) and settings.timeContextEnabled (agent knows the current date/time; default on).

Flags: `writes` `destructive` `structured output`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `flow_id` | string | yes |  |
| `update` | object (map) | yes | Fields to update, e.g. \{"name": "...", "settings": \{"callSetting": \{"maxCallDuration": 900\}\}\} |
| `workspace_id` | string | no | Run this call in another workspace: its id or its name (see trillet_list_workspaces). Omit to use the default (TRILLET_WORKSPACE_ID, the workspace picked when the connector was approved, or the one set with trillet_switch_workspace). |

### Structured output

Returned as `structuredContent` (fields are optional; the same data is in the text result):

| Field | Type | Description |
| --- | --- | --- |
| `id` | string |  |
| `name` | string |  |
| `direction` | string |  |
| `promptType` | string |  |
| `agentId` | string |  |
| `promptLength` | number |  |
| `inCallApiTools` | string[] |  |
| `knowledgeBases` | any[] |  |
| `postCallAnalysisFields` | string[] |  |
| `settings` | object |  |
| `hasActiveDraft` | boolean |  |
| `updatedAt` | string |  |

## `trillet_update_prompt`

**Update prompt**

Replace a call flow's prompt. The API auto-snapshots a prompt version on every update. Prompt conventions: reference in-call API tools as \{\{realtime_api "tool_name" "var1, var2"\}\} (the canonical token the runtime documents to the model); \{\{key\}\} placeholders are substituted from per-call dynamic variables; do NOT hardcode a scripted greeting in the prompt because the platform welcome message already plays it (a scripted 'Begin with' line causes the agent to greet twice).

Flags: `writes` `destructive` `structured output`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `flow_id` | string | yes |  |
| `prompt` | string | yes |  |
| `workspace_id` | string | no | Run this call in another workspace: its id or its name (see trillet_list_workspaces). Omit to use the default (TRILLET_WORKSPACE_ID, the workspace picked when the connector was approved, or the one set with trillet_switch_workspace). |

### Structured output

Returned as `structuredContent` (fields are optional; the same data is in the text result):

| Field | Type | Description |
| --- | --- | --- |
| `id` | string |  |
| `promptLength` | number |  |
| `promptVersions` | number |  |

## `trillet_set_incall_api_tools`

**Set in-call API tools**

Replace the flow's in-call API tools (LLM-invokable HTTP calls during the call). Sends the COMPLETE array (arrays replace wholesale). GOTCHA: the runtime auto-appends call metadata into request bodies/query params unless callSetting.disableMetadata is true; strict APIs like Airtable reject unknown body keys, so disable_metadata defaults to true here.

Flags: `writes` `destructive` `structured output`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `flow_id` | string | yes |  |
| `tools` | object[] | yes | Complete list of in-call API tools |
| `disable_metadata` | boolean | no | Set callSetting.disableMetadata (recommended true for strict third-party APIs) Default: `true`. |
| `workspace_id` | string | no | Run this call in another workspace: its id or its name (see trillet_list_workspaces). Omit to use the default (TRILLET_WORKSPACE_ID, the workspace picked when the connector was approved, or the one set with trillet_switch_workspace). |

### Structured output

Returned as `structuredContent` (fields are optional; the same data is in the text result):

| Field | Type | Description |
| --- | --- | --- |
| `id` | string |  |
| `inCallApiTools` | string[] |  |
| `disableMetadata` | boolean |  |
| `promptReminder` | string |  |

## `trillet_set_post_call_analysis`

**Set post-call analysis fields**

Replace the flow's post-call analysis fields (structured extraction after each call; results land in the call's analyzedData and are available to workflows as \{\{trigger.analyzedData.&lt;name&gt;\}\}). The platform always adds summary, call_disposition, and call_sentiment automatically. Tip: make selector options exactly match any downstream system's allowed values.

Flags: `writes` `destructive` `structured output`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `flow_id` | string | yes |  |
| `fields` | object[] | yes |  |
| `workspace_id` | string | no | Run this call in another workspace: its id or its name (see trillet_list_workspaces). Omit to use the default (TRILLET_WORKSPACE_ID, the workspace picked when the connector was approved, or the one set with trillet_switch_workspace). |

### Structured output

Returned as `structuredContent` (fields are optional; the same data is in the text result):

| Field | Type | Description |
| --- | --- | --- |
| `id` | string |  |
| `postCallAnalysisFields` | string[] |  |

## `trillet_list_drafts`

**List editor drafts**

List builder drafts for a call flow. An ACTIVE draft silently overrides production for dashboard test calls and the editor view; it is the number-one cause of 'my changes are not taking effect'.

Flags: `read-only` `structured output`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `flow_id` | string | yes |  |
| `workspace_id` | string | no | Run this call in another workspace: its id or its name (see trillet_list_workspaces). Omit to use the default (TRILLET_WORKSPACE_ID, the workspace picked when the connector was approved, or the one set with trillet_switch_workspace). |

### Structured output

Returned as `structuredContent` (fields are optional; the same data is in the text result, where it is a bare array):

| Field | Type | Description |
| --- | --- | --- |
| `drafts` | object[] |  |

## `trillet_deactivate_drafts`

**Deactivate drafts (use production)**

Deactivate all editor drafts on a call flow so test calls and the editor use the production version. Run this after API-side edits if a stale builder tab created a draft. Drafts are recoverable, not deleted. Warn the user that anyone with the flow open in a browser should refresh before editing, or their stale tab may re-create the draft or publish over the changes.

Flags: `writes` `destructive` `idempotent`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `flow_id` | string | yes |  |
| `workspace_id` | string | no | Run this call in another workspace: its id or its name (see trillet_list_workspaces). Omit to use the default (TRILLET_WORKSPACE_ID, the workspace picked when the connector was approved, or the one set with trillet_switch_workspace). |

## `trillet_publish_draft`

**Publish draft to production**

Publish a specific draft/version snapshot into the flow's PRODUCTION config (live calls pick it up immediately). Get draft ids from trillet_list_drafts. This overwrites production wholesale with the draft's contents.

Flags: `writes` `destructive` `asks for confirmation`

Clients that support MCP elicitation show a confirmation form before this tool runs; declining cancels it with no changes. Other clients rely on their own approval prompt.

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `flow_id` | string | yes |  |
| `draft_id` | string | yes |  |
| `workspace_id` | string | no | Run this call in another workspace: its id or its name (see trillet_list_workspaces). Omit to use the default (TRILLET_WORKSPACE_ID, the workspace picked when the connector was approved, or the one set with trillet_switch_workspace). |

## `trillet_duplicate_call_flow`

**Duplicate call flow**

Duplicate a call flow (prompt, settings, in-call API tools, post-call analysis) as a new flow in the same workspace.

Flags: `writes` `structured output`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `flow_id` | string | yes |  |
| `workspace_id` | string | no | Run this call in another workspace: its id or its name (see trillet_list_workspaces). Omit to use the default (TRILLET_WORKSPACE_ID, the workspace picked when the connector was approved, or the one set with trillet_switch_workspace). |

### Structured output

Returned as `structuredContent` (fields are optional; the same data is in the text result):

| Field | Type | Description |
| --- | --- | --- |
| `id` | string |  |
| `name` | string |  |
| `direction` | string |  |
| `promptType` | string |  |
| `agentId` | string |  |
| `promptLength` | number |  |
| `inCallApiTools` | string[] |  |
| `knowledgeBases` | any[] |  |
| `postCallAnalysisFields` | string[] |  |
| `settings` | object |  |
| `hasActiveDraft` | boolean |  |
| `updatedAt` | string |  |

## `trillet_archive_call_flow`

**Archive / restore call flow**

Archive a call flow (hides it from the default list and takes it out of use without deleting) or restore an archived one.

Flags: `writes` `destructive` `idempotent`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `flow_id` | string | yes |  |
| `restore` | boolean | no | true un-archives the flow Default: `false`. |
| `workspace_id` | string | no | Run this call in another workspace: its id or its name (see trillet_list_workspaces). Omit to use the default (TRILLET_WORKSPACE_ID, the workspace picked when the connector was approved, or the one set with trillet_switch_workspace). |

## `trillet_delete_call_flow`

**Delete call flow**

Permanently delete a call flow. Prefer trillet_archive_call_flow unless the flow is definitely disposable (e.g. cleaning up a demo). Always confirm with the user; requires confirm=true.

Flags: `writes` `destructive` `asks for confirmation`

Clients that support MCP elicitation show a confirmation form before this tool runs; declining cancels it with no changes. Other clients rely on their own approval prompt and the `confirm` argument.

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `flow_id` | string | yes |  |
| `confirm` | boolean | yes | Must be true. Only set after the user explicitly approved deleting this flow. |
| `workspace_id` | string | no | Run this call in another workspace: its id or its name (see trillet_list_workspaces). Omit to use the default (TRILLET_WORKSPACE_ID, the workspace picked when the connector was approved, or the one set with trillet_switch_workspace). |
