How does the TOOL work?

Hi,

I am creating a demo with SerperDevTool, and seems like Agent/Task can dynamically generate argument for tool based on the task?

can someone share how the Agent work with Tool?
e.g.

  1. how to build the argument for tool?
  2. how to execute tool?
  3. and how to use the output of tool?

thank you.