retell_update_call
Modify call metadata or adjust data retention policies for specific voice agent conversations.
Instructions
Update call metadata or data storage settings for a specific call.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| call_id | Yes | The unique identifier of the call to update | |
| metadata | No | New metadata to set for the call | |
| data_storage_setting | No | Data retention policy for the call |
Implementation Reference
- src/index.ts:161-183 (registration)Tool registration defining the name, description, and input schema for retell_update_call.{ name: "retell_update_call", description: "Update call metadata or data storage settings for a specific call.", inputSchema: { type: "object", properties: { call_id: { type: "string", description: "The unique identifier of the call to update" }, metadata: { type: "object", description: "New metadata to set for the call" }, data_storage_setting: { type: "string", enum: ["everything", "everything_except_pii", "basic_attributes_only"], description: "Data retention policy for the call" } }, required: ["call_id"] } },
- src/index.ts:164-182 (schema)Input schema defining parameters for the retell_update_call tool: call_id (required), metadata, data_storage_setting.inputSchema: { type: "object", properties: { call_id: { type: "string", description: "The unique identifier of the call to update" }, metadata: { type: "object", description: "New metadata to set for the call" }, data_storage_setting: { type: "string", enum: ["everything", "everything_except_pii", "basic_attributes_only"], description: "Data retention policy for the call" } }, required: ["call_id"] }
- src/index.ts:1131-1134 (handler)Handler logic in switch statement: destructures call_id from arguments, sends PATCH request to Retell API endpoint /v2/update-call/{call_id} with remaining update data.case "retell_update_call": { const { call_id, ...updateData } = args; return retellRequest(`/v2/update-call/${call_id}`, "PATCH", updateData as Record<string, unknown>); }
- src/index.ts:23-57 (helper)Generic retellRequest helper function used by the tool handler to make authenticated API calls to Retell AI.async function retellRequest( endpoint: string, method: string = "GET", body?: Record<string, unknown> ): Promise<unknown> { const apiKey = getApiKey(); const headers: Record<string, string> = { "Authorization": `Bearer ${apiKey}`, "Content-Type": "application/json", }; const options: RequestInit = { method, headers, }; if (body && method !== "GET") { options.body = JSON.stringify(body); } const response = await fetch(`${RETELL_API_BASE}${endpoint}`, options); if (!response.ok) { const errorText = await response.text(); throw new Error(`Retell API error (${response.status}): ${errorText}`); } // Handle 204 No Content if (response.status === 204) { return { success: true }; } return response.json(); }