There has to be a way to do this…
I have an AI Agent and I am using 3 AirTable tools, searchContacts, createContact and createInvoice. When I create an invoice, I have to pass the “id” of the contact that is being returned by one of the previous two tools, searchContacts or createContact. No matter what I make the system prompt be, or using Simple Memory, I can’t make it pass the ID returned from one of the other two tools into the createInvoice Tool. Not only that it needs to use the “id” key returned by one of the two previous tools, but it also has to format it as a string array.
System Prompt:
Tools
You have the following three tools available to you to achieve this task. You have to use them in this exact order and there’s no reason to have to use them more than once.
- searchContacts - Always check first if a contact exists before creating a new one.
- createContact - Create a contact only if they DO NOT exist.
- createInvoice - Used to create a new invoice. When calling this tool, you MUST provide it with the “id” key returned by either searchContacts or createContact and must be called in this format “Name”: [“abc123”]
Note: when I have this “Name”: [“abc123”] in the System Prompt, the exec fails with
Problem in node ‘Invoicing AI Agent‘ Received tool input did not match expected schema
Any ideas or suggestions?
Thanks much. Cheers,
Alex