Ciaran
02/19/2026, 11:27 AMAI Evy
02/19/2026, 11:28 AMAI Evy
02/19/2026, 11:28 AMAI Evy
02/19/2026, 11:28 AMemail) in your tool's JSON schema
2. In your prompt, instruct the agent how to use that value—for example: "Use the email mentioned by the customer and call the xyz function with that"
The LLM will automatically pick up the value provided by the user during the conversation and pass it as an argument when invoking the function.
Additionally, when a custom function is called, the request body includes the full transcript of the conversation, which contains all user and agent utterances with word-level timestamps. [(2) ]()
Here's a snippet of what the request body looks like:
json
"transcript": [
{
"role": "user",
"content": "Yes, it's 78542.",
"words": [
{ "word": "Yes,", "start": 11.5, "end": 11.8 },
{ "word": "it's", "start": 11.9, "end": 12.1 },
{ "word": "78542.", "start": 12.2, "end": 12.9 }
]
}
]
This gives your function access to everything the user has said during the call.AI Evy
02/19/2026, 11:28 AMCiaran
02/19/2026, 11:29 AMAI Evy
02/19/2026, 11:29 AMAI Evy
02/19/2026, 11:29 AMprompt parameter should work—the LLM will extract what the user said and pass it as the argument value. [(1) ]()
However, you also have access to the full transcript in the request body that Retell sends to your custom function endpoint. When your function is called, the request includes a transcript array containing all user and agent utterances. [(2) ]()
So you have two options:
1. Use your parameter approach — The LLM will fill in the prompt parameter with the user's utterance. Make sure your agent prompt explicitly instructs when to call this function with the user's message.
2. Access the transcript directly — Your endpoint receives the complete conversation history in the request body. You can parse the transcript array to get the latest user message:
json
"transcript": [
{
"role": "user",
"content": "Hello, how are you",
"words": [
{ "word": "Hello,", "start": 4.0, "end": 4.3 },
{ "word": "how", "start": 4.4, "end": 4.6 },
{ "word": "are", "start": 4.6, "end": 4.8 },
{ "word": "you", "start": 4.8, "end": 4.9 }
]
}
]
In your backend code, you can extract the most recent user message from this transcript array rather than relying solely on the LLM to pass it as a parameter.AI Evy
02/19/2026, 11:29 AMAI Evy
02/19/2026, 11:29 AMCiaran
02/19/2026, 11:30 AMAI Evy
02/19/2026, 11:30 AMAI Evy
02/19/2026, 11:30 AMjson
"prompt": {
"type": "string",
"description": "The exact verbatim text of what the user just said, word for word, without interpretation or summarization"
}
[(1) ]()
2. Use the transcript from the request body instead:
When Retell calls your custom function, the request body includes the full call object with the real-time transcript. You can parse this in your backend to get the exact user utterance:
json
"call": {
"transcript": [
{
"role": "user",
"content": "Hello, how are you",
"words": [...]
}
]
}
This approach is more reliable because you're reading the actual transcribed speech directly from the transcript array, rather than depending on the LLM to pass it accurately as a parameter.
In your endpoint code, simply grab the last user message from the transcript array—this will always be the exact transcription without any LLM interpretation.AI Evy
02/19/2026, 11:30 AMAI Evy
02/19/2026, 11:30 AMCiaran
02/19/2026, 11:31 AMAI Evy
02/19/2026, 11:31 AMAI Evy
02/19/2026, 11:32 AMAI Evy
02/19/2026, 11:32 AMAI Evy
02/19/2026, 11:32 AM