Dialogflow Messenger missing toolCall data in API response

I’m working with Vertex AI Agent Builder and trying to implement function tools. The issue is that I get different responses depending on how I test the agent.

What should happen according to docs:

{
  "result": {
    "userQuery": "what's the temperature in Seattle",
    "lang": "en",
    "messages": [
      {
        "type": "AGENT",
        "functionCall": {
          "resource": "<tool-id>",
          "method": "fetch-temperature",
          "params": {
            "city": "Seattle"
          }
        }
      }
    ]
  }
}

Testing in Agent Builder console:
When I ask “what’s the temperature in Berlin” directly in the console, the network call shows proper toolCall data:

"result": {
  "userQuery": "what's the temperature in Berlin?",
  "lang": "en",
  "messages": [
    {
      "type": "AGENT",
      "functionCall": {
        "resource": "projects/myproject/locations/us/agents/12345/tools/67890",
        "method": "fetchTemperature",
        "params": {
          "city": "Berlin, Germany",
          "scale": "fahrenheit"
        }
      }
    }
  ]
}

Testing with Dialogflow Messenger:
But when I use the same query through Dialogflow Messenger integration, the response is empty:

"result": {
  "userQuery": "what's the temperature in Berlin?",
  "lang": "en",
  "messages": [
    {}
  ]
}

Then I get an error saying the session is waiting for tool execution results. Why does the console version include toolCall data but the Messenger integration doesn’t? How can I get the function call information in Messenger responses?

Yeah, that’s how Dialogflow Messenger works by design. The console shows you everything - tool calls, intermediate steps, the whole process. But Messenger is built for end users, so it only shows the final result. That empty object you’re seeing? It means the tool is still running and hasn’t finished yet. You need a webhook that can handle function calls and send back results that Dialogflow can actually show users. Once you get that set up right, Messenger will display the final output after the tool finishes executing.

Console and Messenger act differently because they’re built for different things. Console shows raw API responses for debugging, while Messenger handles the full conversation flow.

I’ve dealt with this before - you need to set up your webhook to catch and process those function calls. That empty message object means the system triggered a tool call, but your webhook isn’t grabbing it or sending back proper results.

Here’s my usual approach: create a webhook endpoint that listens for function call events, runs the actual temperature API call, then sends the formatted response back to Dialogflow. The trick is making sure your webhook handles tool execution and returns results in the format Messenger wants.

Start by checking your webhook logs. You should see incoming requests with tool call data when users ask about temperature through Messenger. If those requests aren’t showing up, your webhook URL probably isn’t configured right in the agent settings.

This video covers handling tool calls and responses in Dialogflow Messenger:

Get your webhook processing tool calls correctly, and Messenger will display the actual temperature results instead of those empty message objects.

I hit this exact problem a few months ago. Dialogflow Messenger wants you to actually run the function and return results - not just receive the function call data. That empty message? It’s because the system’s waiting for your webhook to process the function call and send back a response. You need a webhook endpoint that catches the function call, runs your temperature fetching logic, then sends the results back via API. The console shows raw function call data for debugging, but Messenger expects you to handle all that behind the scenes. Make sure your webhook’s set up to actually execute these functions.