Some additional information. This post assisted with defining a set structure for the input to the tool. How to define AI-powered Extra Workflow Inputs in AI tools? - #10 by artildo
Issue was that the input was still being returned as a string value for the query field. Had to use a Code node to convert it to a json object.
Realized something else. If using n8n tools you cannot use functions on the openAI side as the Functions will be replaced by the tool implementation, thus losing your function description. This is not made clear in the UI and i lost my function definitions as a result. Tools does not use the “parameters” information on the function definition which is why you need to use the description to specify your parameter requirements.
My recommendation:
- On the tool node, have a way to indicate that you want to use a pre-defined function in the assistent and not create\replace the function with the tool definition.
- Respect the function parameters as defined if that is the case and pass it along to the Workflow.