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
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 26s
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user