refactor: restructure tools/list response to strictly follow MCP schema standard (PDF page 62)
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 26s

This commit is contained in:
jade
2026-08-13 18:15:10 +09:00
parent ad4758d0ba
commit 33e1261b38
12 changed files with 104 additions and 122 deletions

View File

@@ -206,7 +206,7 @@
const tools = data.result?.tools || [];
const groupedTools = {};
tools.forEach(tool => {
const group = tool.categoryKey || 'Others';
const group = tool._meta?.category_key || 'Others';
if (!groupedTools[group]) groupedTools[group] = [];
groupedTools[group].push(tool);
});
@@ -217,9 +217,9 @@
const option = document.createElement('option');
option.value = tool.name;
option.textContent = tool.name;
option.dataset.schema = JSON.stringify(tool.inputSchema || tool.parametersSchema);
option.dataset.schema = JSON.stringify(tool.parametersSchema);
option.dataset.prompts = JSON.stringify(tool.actionPrompts || {});
option.dataset.integrationType = tool.integrationType || 'HTTP';
option.dataset.integrationType = tool._meta?.integrationType || 'HTTP';
optgroup.appendChild(option);
if (tool.actionPrompts) Object.assign(actionPrompts, tool.actionPrompts);
});