https://retellai.com/?utm_source=discord&utm_medium=seo logo
for the parameters will i have to keep the type an...
# ❓・ai-evy-support
z
@AI Evy for the parameters will i have to keep the type and description of the property
a
Thanks for tagging me @zubeyrahmed. I'll look through relevant sources and get back to you shortly.
### Answer [(1) ]() Yes, for custom tool parameters in Retell AI, you need to include both the
type
and
description
for each property. Based on the documentation, here's the required format:
Copy code
json
"parameters": {
  "type": "object",
  "properties": {
    "address": {
      "type": "string",
      "description": "",
      "enum": ["omar"]
    }
  },
  "required": [
    "address"
  ]
}
Each property in the parameters object must have a
type
field (like "string", "number", etc.) and a
description
field (which can be an empty string if needed, but the field must be present) .
​ To learn more, see the sources I considered: [[1] Issue with Custom Tool Type in Retell LLM API](https://discord.com/channels/1186424376300679209/1387733666129510541) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
z
how does retell use it
@AI Evy how does retell use it
a
Thanks for the follow-up, @zubeyrahmed. I'll get back to you soon.
### Answer Retell AI uses the
type
and
description
in your function parameters for several key purposes: ## LLM Decision Making The LLM uses the
description
to understand when and how to call your function [(1) ]() . The description helps the agent decide if a function is needed based on the conversation context . ## Parameter Extraction When the LLM determines a function should be called, it uses the
type
and
description
to extract the correct information from the conversation and structure it properly . ## JSON Schema Validation Retell follows the JSON schema format for function definitions [(2) ]() . The parameters must be defined using JSON schema format, where each property requires both
type
and
description
fields . ## Function Execution Process Here's how Retell processes your function parameters [(1) ]() : 1. **Agent Decision**: The LLM uses your function description to determine when the function is needed 2. **Parameter Extraction**: The agent extracts required information using the parameter definitions 3. **Function Execution**: Retell calls your function with the extracted parameters 4. **Response Handling**: The function result is processed and incorporated into the conversation ## Technical Implementation Function calling uses structured JSON to communicate between the LLM and your systems :
Copy code
json
{
 "function": "book_appointment",
 "arguments": {
 "date": "2024-03-15",
 "time": "14:00",
 "customer_name": "John Smith"
 }
}
The
type
ensures proper data formatting, while the
description
guides the LLM on what information to extract from the conversation and when to use the function [(2) ]() [(1) ]() .
​ To learn more, see the sources I considered: [[1] Function Calling Overview](https://docs.retellai.com/build/single-multi-prompt/function-calling) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
z
@AI Evy i have this as my function result. is there a limit to a function call or just for dynamic variable assignment. also how do i set the response variables for get func https://cdn.discordapp.com/attachments/1424129801765126275/1426259723531063397/message.txt?ex=68ea9360&is=68e941e0&hm=648cea3d1f5116535fecbc225b3c5eead256837c486151f09bd0223e6d8eb95e&
a
Thanks for the follow-up, @zubeyrahmed. I'll get back to you soon.
### Answer --- ### Answer ## Function Result Limits Yes, there is a limit on function call results. The function result is capped at 15,000 characters to prevent overloading the LLM context window [(1) ]() . ## Response Format The response from your custom function endpoint can be in various formats : - string - buffer - JSON object - blob All these formats will be converted to string before sending to the LLM for further processing . ## Setting Response Variables for GET Functions For GET requests specifically, you cannot use the request body for parameters . Instead, you should: 1. **Use Query Parameters**: Define query parameters that Retell will append to your endpoint URL . Query parameter values can be static or include dynamic variables . 2. **Use Dynamic Variables**: You can include dynamic variables in your query parameters using the
{{variable_name}}
syntax [(2) ]() . Dynamic variables work in tool configurations, including custom function URLs and property descriptions . For example, if you need to pass data to a GET endpoint, structure it like:
Copy code
<https://your-endpoint.com/api/get_data?user_id=%7B%7Buser_id%7D%7D&session=%7B%7Bsession_id%7D%7D>
The response from your GET function will be processed the same way as other HTTP methods - it will be converted to a string (with the 15,000 character cap) and sent to the LLM for further processing [(1) ]() . **
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[2] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.