diff --git a/ui/suite/chat/chat.html b/ui/suite/chat/chat.html
index 224ebc6..83f4f8f 100644
--- a/ui/suite/chat/chat.html
+++ b/ui/suite/chat/chat.html
@@ -829,9 +829,14 @@
console.log("Parsed action:", action);
if (action.type === "invoke_tool") {
- // Send the display text so it shows correctly in chat
- // The backend will recognize this as a tool request
- window.sendMessage(sugg.text);
+ // Check if tool needs parameters
+ if (action.prompt_for_params) {
+ // Need parameters, send text as message
+ window.sendMessage(sugg.text);
+ } else {
+ // No params needed - invoke tool directly
+ window.sendMessage("/tool " + action.tool);
+ }
} else if (action.type === "send_message") {
window.sendMessage(
action.message || sugg.text,
diff --git a/ui/suite/partials/chat.html b/ui/suite/partials/chat.html
index 183691c..84065f6 100644
--- a/ui/suite/partials/chat.html
+++ b/ui/suite/partials/chat.html
@@ -1041,9 +1041,14 @@
console.log("Parsed action:", action);
if (action.type === "invoke_tool") {
- // Send the display text so it shows correctly in chat
- // The backend will recognize this as a tool request
- window.sendMessage(sugg.text);
+ // Check if tool needs parameters
+ if (action.prompt_for_params) {
+ // Need parameters, send text as message
+ window.sendMessage(sugg.text);
+ } else {
+ // No params needed - invoke tool directly
+ window.sendMessage("/tool " + action.tool);
+ }
} else if (action.type === "send_message") {
window.sendMessage(
action.message || sugg.text,