Allow tools to run at a certain time
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3518111. -->
Reported by: [marcus_johansson](https://www.drupal.org/user/385947)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>One of the strength with the AI Agents 1.0.0 pattern, was that it was consistent when tools ran and with an consistent amount of tokens used.</p>
<p>If you had an agent that was made for creating a taxonomy term, you knew which tool should be run - first validation that it doesn't exist, validation that the vocabulary exists etc and then creation.</p>
<p>Many AI providers has a "force_tool_use" where you can say that one tool has to be used. This means that in the above case we could define that validation tools runs on the 1 run and creation on the 2 run, to make sure that its more stable.</p>
<p>That would remove the last "advantage" the old system had.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>On the detailed tool usage for any tool, we add a free text field that say something like "Force use on nth run"<br>
In this tool you can give back one or many numbers.<br>
When the agents is running the tools, on that nth run check if there are any tools that should be forced and set them to forced.</p>
issue