Skip to content

Commit ac1e054

Browse files
deagonmadhav165
andauthored
fix: wrap tool description using <br/> (#554)
* fix: wrap tool description using <br/> * minor dark color change Signed-off-by: Madhav Kandukuri <[email protected]> --------- Signed-off-by: Madhav Kandukuri <[email protected]> Co-authored-by: Madhav Kandukuri <[email protected]>
1 parent c23f086 commit ac1e054

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

mcpgateway/static/admin.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3234,8 +3234,11 @@ async function testTool(toolId) {
32343234
titleElement.textContent = "Test Tool: " + (tool.name || "Unknown");
32353235
}
32363236
if (descElement) {
3237-
descElement.textContent =
3238-
tool.description || "No description available.";
3237+
if (tool.description) {
3238+
descElement.innerHTML = tool.description.replace(/\n/g, '<br/>');
3239+
} else {
3240+
descElement.textContent = "No description available.";
3241+
}
32393242
}
32403243

32413244
const container = safeGetElement("tool-test-form-fields");

mcpgateway/templates/admin.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ <h2 class="text-2xl font-bold dark:text-gray-200">Registered Tools</h2>
393393
{{ tool.requestType }}
394394
</td>
395395
<td class="px-2 py-4 whitespace-normal break-words text-sm text-gray-500 dark:text-gray-300">
396-
{{ tool.description }}
396+
{{ tool.description | replace('\n', '<br/>') | safe }}
397397
</td>
398398
<td class="px-2 py-4 whitespace-nowrap">
399399
{% if tool.annotations %}

0 commit comments

Comments
 (0)