Tools Explorer: force_value limit is only the first character
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3575592. -->
Reported by: [ahmad khader](https://www.drupal.org/user/3727855)
Related to !1244
>>>
<p>[Tracker]<br>
<strong>Update Summary: </strong>[One-line status update for stakeholders]<br>
<strong>Short Description: </strong>[One-line issue summary for stakeholders]<br>
<strong>Check-in Date: </strong>MM/DD/YYYY<br>
<em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br>
[/Tracker]</p>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>In <code>ToolsExplorer::getResponse()</code>, the <code>force_value</code> action incorrectly applies only the first character of the configured value instead of the full string. This is because <code>$limit['values'</code>] is a raw textarea string and <code>array access [0]</code> on a string returns empty.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce (required for bugs, but not feature requests)</h4>
<ol>
<li>Go to AI API Explorer → Tools Explorer</li>
<li>Select any tool</li>
<li>Under Limits, pick a property and set the action to Force value</li>
<li>Enter a value like<code> txt /n foo</code> in the textarea</li>
<li>Submit the form</li>
<li>Observe that the forced value is the first character instead of the right values</li>
</ol>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p><code>$property->setDefaultValue($limit['values'][0]);</code> to <code>$property->setDefaultValue($values[0]);</code></p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3>Optional: Other details as applicable (e.g., User interface changes, API changes, Data model changes)</h3>
<h3 id="summary-ai-usage">AI usage (if applicable)</h3>
<p>[ ] AI Assisted Issue<br>
This issue was generated with AI assistance, but was reviewed and refined by the creator.</p>
<p>[ ] AI Assisted Code<br>
This code was mainly generated by a human, with AI autocompleting or parts AI generated, but under full human supervision.</p>
<p>[ ] AI Generated Code<br>
This code was mainly generated by an AI with human guidance, and reviewed, tested, and refined by a human.</p>
<p>[ ] Vibe Coded<br>
This code was generated by an AI and has only been functionally tested.</p>
issue