(Discuss) Create a better UI/system for restricting tools
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3552047. -->
Reported by: [marcus_johansson](https://www.drupal.org/user/385947)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>This is discuss right now, because it might work better in Tool API and just reuse it here.</p>
<p>The current way to restricting or fixating tools are very much based on single simple types like string, boolean, integer. </p>
<p>As soon as you want to make something more complex, it will not work without using events and code.</p>
<p>The current only restrictions for inputs are also just "Force Value" and "Only Allow Certain Values".</p>
<p>We should add some system so that any context defintions/input definitions can be used in the form, also in when multiple values are allowed.</p>
<p>We should also be able to set it for complex objects - if you want a list of objects for instance, this should be possible. Or even restrictions of a specific field of an object. Though this might be complex both from development standpoint and from UX/UI standpoint.</p>
<p>We should be able to set regex as a third option to "Force Value" and "Only Allow Certain Values"</p>
<p>We should also be able to set or override a default value.</p>
issue