How to ensure crewAI agent tries only once

HI,

I am using an custom tool in an agent with no delegation. I want my agent to try only once to get result, but in scenario my tool throws an error the agent will still try 6 times, I have tried to set flag max_iter, max_retry_limit but no change in agent beahavior of trying 6 times before giving error.

Is there a way I can ensure how many times agent tries to get answer?

My current crewai version is 0.86.0 with crewai-tools=0.17.0.

Any suggestions to approach the problem is highly appreciated.

Thanks,
Arjun