Define a tool for the AI Agent: describe what it does and which parameters the model fills in, then build the tool's logic behind it (any components, branching included) and end every branch with 'Tool Output'. Connect it to the agent's 'tools' port, next to any other tools of the agent.