Nicolas
05/21/2026, 10:38 PMAI Evy
05/21/2026, 10:38 PMAI Evy
05/21/2026, 10:38 PMAI Evy
05/21/2026, 10:38 PMAI Evy
05/21/2026, 10:38 PMtypescript
export interface FunctionCall {
id: string;
funcName: string;
arguments: Record<string, any>;
result?: string;
}
The function definitions are prepared in your server-side code:
typescript
private PrepareFunctions() : ChatCompletionsFunctionToolDefinition[] {
let functions: ChatCompletionsFunctionToolDefinition[] = [{
type: "function",
function: {
name: "end_call",
description: "End the call only when user explicitly requests it.",
parameters: {
type: "object",
properties: {
message: {
type: "string",
For a simpler approach without custom LLM integration, you can use Code Tool, which lets you write JavaScript code directly in the dashboard that executes during calls. [(4) ]() This doesn't require mocking functions through the API endpoint—instead, you configure tools in your agent settings.Nicolas
05/21/2026, 10:43 PMAI Evy
05/21/2026, 10:43 PMAI Evy
05/21/2026, 10:43 PMjson
{
"name": "function_name",
"call": { /* call object */ },
"args": { /* function arguments */ }
}AI Evy
05/21/2026, 10:43 PMX-Retell-Signature header if needed
The custom functions themselves aren't "passed" to the web-call endpoint—they're pre-configured in your agent and automatically available during any call using that agent. [(1) ]() [(2) ]()AI Evy
05/21/2026, 10:43 PMAI Evy
05/21/2026, 10:43 PM