From cfd074163b46a5957e5f0bb0c835b277eaf43e8d Mon Sep 17 00:00:00 2001 From: jade Date: Mon, 31 Aug 2026 17:55:16 +0900 Subject: [PATCH] fix: use inputSchema for MCP tool definitions in tester.html --- dat-gateway/src/main/resources/static/tester.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dat-gateway/src/main/resources/static/tester.html b/dat-gateway/src/main/resources/static/tester.html index 6f4c43b7..aa0dac4e 100644 --- a/dat-gateway/src/main/resources/static/tester.html +++ b/dat-gateway/src/main/resources/static/tester.html @@ -372,7 +372,7 @@ function generateDummyPayload(tool) { if (tool._customPayload) return tool._customPayload; - const schema = tool.parametersSchema; + const schema = (tool.inputSchema || tool.parametersSchema); if (!schema || !schema.properties) return {}; const payload = {}; for (const [key, value] of Object.entries(schema.properties)) { @@ -761,7 +761,7 @@ async function executeRawCall(name, payload) { } function renderSmartForm(tool, payloadToUse = null) { - const schema = tool.parametersSchema; + const schema = (tool.inputSchema || tool.parametersSchema); const form = document.getElementById('payloadFormContainer'); form.innerHTML = ''; @@ -1063,8 +1063,8 @@ async function executeRawCall(name, payload) { // Or we just map /mcp/api/v1/tools/call and use tool names as different request bodies, // but for documentation purposes, mapping them as separate virtual paths is usually better to view in Swagger UI. currentExportJson.forEach(tool => { - const schemaProps = tool.parametersSchema?.properties || {}; - const required = tool.parametersSchema?.required || []; + const schemaProps = (tool.inputSchema || tool.parametersSchema)?.properties || {}; + const required = (tool.inputSchema || tool.parametersSchema)?.required || []; paths[`/mcp/api/v1/tools/call?name=${tool.name}`] = { post: { @@ -1148,8 +1148,8 @@ async function executeRawCall(name, payload) { md += `### \`${tool.name}\`\n\n`; md += `**Description:** ${tool.description || 'N/A'}\n\n`; - const props = tool.parametersSchema?.properties || {}; - const reqs = tool.parametersSchema?.required || []; + const props = (tool.inputSchema || tool.parametersSchema)?.properties || {}; + const reqs = (tool.inputSchema || tool.parametersSchema)?.required || []; if (Object.keys(props).length > 0) { md += `#### Parameters\n\n`;