Hi, I'm developing an AI agent utilizing the Google Gemini model. The objective is for the agent to invoke a Google Drive tool to generate a folder, with its name supplied via the chat interface.
The agent correctly identifies the intent and triggers the appropriate tool, however, the Input
for the tool consistently remains empty, preventing parameters from being passed.
My Setup:
- Agent: Employing the Agent node with Google Gemini.
- Tool Definition: I'm defining the tool's schema manually by inputting a JSON object into the tool node’s “Description” field, configured to Expression mode.
Troubleshooting Steps Taken:
- Experimented with various detailed and simplified system prompts.
- Streamlined the workflow to a single tool with a solitary parameter.
- Verified that my expressions within the tool (
{{ $json.name }}
) are accurate.
The logs reliably indicate the agent invoking the tool, but the Input
is always reported as No fields - item(s) exist, but they're empty
. I suspect this might be a bug.
Here are the logs from a minimal test case:
Could someone please advise on this issue?
Wow, thanks for this response! I wasn't aware of {{ $fromAI('folderName', 'the name of the folder to create in Google Drive') }}
.
So, my attempt was to manually input the tool description. I provided the JSON object like this:
json
{
"name": "create_document",
"description": "Use this tool to create a new Google Doc inside a specific folder. It requires the folder’s ID and a title for the document.",
"properties": {
"folderId": {
"type": "string",
"description": "The unique ID of the parent folder where the document should be created.",
"required": true
},
"documentName": {
"type": "string",
"description": "The title for the new document.",
"required": true
}
}
}
What I was aiming for was to receive a name
property, and then in the folder name field, I tried something like {{ $json.name }}
. However, that didn't work at all; the input from the LLM remained empty. I'm unsure if my entire approach was incorrect or just a portion of it. Does this explanation make sense?
Thanks again for the quick reply.
Hey, the fromAI()
construct is a really useful feature for connecting LLMs with tools. I recommend using it when your data isn't static and the tool itself lacks an "Populate with AI Magic" option.
Glad it was helpful for you.
This discussion was automatically closed 7 days following the last response. New replies are no longer permitted.