https://retellai.com/?utm_source=discord&utm_medium=seo logo
i am getting a tool uses for a function call rathe...
# ❓・ai-evy-support
m
@AI Evy i am getting a tool uses for a function call rather than the params passed into the object "tool_uses": [ { "recipient_name": "functions.function_name", "parameters": { "type": "xxx", "query": "xxx" } }, { "recipient_name": "functions.function_name", "parameters": { "type": "xxx", "query": "xxx" } }
a
Thanks for tagging me @Mikey. I'll look through relevant sources and get back to you shortly.
### Answer --- It looks like you're receiving the raw
tool_uses
structure from the LLM rather than the extracted parameters being passed to your endpoint. A few things to check: 1. **If using Custom LLM integration**: You need to parse the function call output from the LLM yourself and handle the tool execution logic in your server code. The
tool_uses
array with
recipient_name
and
parameters
is the raw output format from the LLM—you're responsible for extracting the
parameters
and executing the function accordingly. [(1) ]() 2. **If using Retell's built-in Custom Function**: When Retell calls your endpoint, the request body should contain an
args
field with the function arguments. The expected request body format includes: - `name`: the name of the custom function - `call`: the call object for context - `args`: the arguments for the custom function as a JSON object [(2) ]() 3. **Model-related issues**: There have been reports of certain models (like GPT-4o) not passing required parameters correctly. Switching to a different model version (like GPT-4.1) has helped in some cases. [(3) ]() Could you clarify: - Are you using a Custom LLM integration or Retell's built-in agent framework (Single/Multi Prompt or Conversation Flow) ? - What model are you using? This will help narrow down whether the issue is in how the function call output is being parsed or a configuration issue.
​ To learn more, see the sources I considered: [[1] Integrate Function Calling](https://docs.retellai.com/integrate-llm/integrate-function-calling) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[3] URGENT: Tool calls are not passing in required parameters](https://discord.com/channels/1186424376300679209/1403199812077092945) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy we are using custom function from retell so it should just be name call args why did it do this and what can we do to prevent it
a
Thanks for the follow-up, @Mikey. I'll get back to you soon.
### Answer When using Retell's built-in Custom Function, the request Retell sends to your endpoint should contain
name
,
call
, and
args
fields in the body. [(1) ]() The
tool_uses
structure you're seeing with
recipient_name
and
parameters
is not the expected format from Retell's Custom Function—that looks like raw LLM output that wasn't properly processed. Possible causes and fixes: 1. **Parameter schema validation issue**: If you failed to save the custom function, it's likely because the parameters are not valid. One common mistake is not adding
"type": "object"
to the top level of the JSON schema. [(2) ]() [(1) ]() 2. **HTTP method configuration**: Verify your custom function is configured with the correct HTTP method (POST, GET, PUT, PATCH, or DELETE) . There was a reported case where a trailing slash in the URL caused the request to be sent as GET instead of POST. [(3) ]() 3. **Verify the request you're receiving**: The expected request body format from Retell should look like: - `name`: the name of the custom function - `call`: the call object with context - `args`: the arguments as a JSON object [(2) ]() [(1) ]() 4. **Check your endpoint**: Ensure your endpoint is correctly receiving and parsing the POST request body. The
X-Retell-Signature
header can be used to verify the request is from Retell. If you're still receiving the
tool_uses
format instead of the expected
args
structure, this m
ay indicate a platform issue or misconfiguration. I'd recommend checking your function's parameter schema and ensuring it's valid JSON with
"type": "object"
at the top level.
​ 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] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[3] Custom function not executing despite being configured as tool in state](https://community.retellai.com/t/custom-function-not-executing-despite-being-configured-as-tool-in-state/705) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.