I’m working with Function Tools in Vertex AI Agent Builder and running into an issue where the toolCall information shows up in some responses but not others.
Based on the documentation, when an agent decides to use a tool, the response should include toolCall details like this:
{
"queryResult": {
"text": "check temperature in San Francisco",
"languageCode": "en",
"responseMessages": [
{
"source": "VIRTUAL_AGENT",
"toolCall": {
"tool": "<tool-identifier>",
"action": "fetch-temperature",
"inputParameters": {
"city": "San Francisco"
}
}
}
]
}
}
When I test this in the Agent Builder interface by asking “what’s the temperature today”, I can see the network calls to dialogflow.clients6.google.com/v3alpha1/ contain the toolCall information properly:
"queryResult": {
"text": "what's the temperature in Berlin?",
"languageCode": "en",
"responseMessages": [
{
"source": "VIRTUAL_AGENT",
"toolCall": {
"tool": "projects/myproject/locations/us/agents/12345/tools/67890",
"action": "fetchTemperature",
"inputParameters": {
"city": "Berlin, Germany",
"format": "fahrenheit"
}
}
}
]
}
However, when I use Dialogflow Messenger integration, the API calls go to dialogflow.googleapis.com/v3/ and the toolCall section is completely missing:
"queryResult": {
"text": "what's the temperature in Berlin?",
"languageCode": "en",
"responseMessages": [
{}
]
}
This causes problems because my client code never gets the tool execution details, and subsequent requests fail with errors like “Session is waiting for tool call result of tool and action fetchTemperature”.
Why do these two interfaces behave differently? Is there a way to get toolCall information through the Dialogflow Messenger API?