diff --git a/dat-gateway/src/main/resources/static/admin/scaffold.html b/dat-gateway/src/main/resources/static/admin/scaffold.html index ab596374..73ab883c 100644 --- a/dat-gateway/src/main/resources/static/admin/scaffold.html +++ b/dat-gateway/src/main/resources/static/admin/scaffold.html @@ -805,13 +805,13 @@
- - + +
-
์ง์ ‘ ๊ฒฝ๋กœ๋ฅ?๋ถ™์—ฌ?ฃ๊ฑฐ???ฐ์ธก [?ด๋” ? ํƒ] ๋ฒ„ํŠผ???Œ๋Ÿฌ ? ํƒ?˜์„ธ??
+
์ง์ ‘ ๊ฒฝ๋กœ๋ฅผ ๋ถ™์—ฌ๋„ฃ๊ฑฐ๋‚˜ ์šฐ์ธก [ํด๋” ์„ ํƒ] ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ์„ ํƒํ•˜์„ธ์š”.
@@ -862,13 +862,13 @@
-
์ง์ ‘ ๊ฒฝ๋กœ๋ฅ?๋ถ™์—ฌ?ฃ๊ฑฐ???ฐ์ธก [?ด๋” ? ํƒ] ๋ฒ„ํŠผ???Œ๋Ÿฌ ? ํƒ?˜์„ธ??
+
์ง์ ‘ ๊ฒฝ๋กœ๋ฅผ ๋ถ™์—ฌ๋„ฃ๊ฑฐ๋‚˜ ์šฐ์ธก [ํด๋” ์„ ํƒ] ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ์„ ํƒํ•˜์„ธ์š”.
@@ -915,11 +915,11 @@
- +
@@ -935,38 +935,36 @@
-
?„์žฌ Tool??๊ฐ™์? UseCase??์ถ”๊??˜๋ฉด, Tool๋ณ?Client๋ฅ??ธ์ถœ?˜๋Š” ?ฌ๋Ÿฌ MCP Tool ๋ฉ”์„œ?œ๊? ?์„ฑ?ฉ๋‹ˆ??
+
ํ˜„์žฌ Tool์„ ๊ฐ™์€ UseCase์— ์ถ”๊ฐ€ํ•˜๋ฉด, Tool๋ณ„ Client๋ฅผ ํ˜ธ์ถœํ•˜๋Š” ์—ฌ๋Ÿฌ MCP Tool ๋ฉ”์„œ๋“œ๊ฐ€ ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค.
- +
-
-
-
๋ฌถ์Œ??์ถ”๊???Tool ?†์Œ ???ผ๋ฐ˜ Generate Tool?€ ๊ธฐ์กด ?จ์ผ Tool ?์„ฑ?…๋‹ˆ??
+
+
+
๋ฌถ์Œ์— ์ถ”๊ฐ€๋œ Tool ์—†์Œ โ€” ์ผ๋ฐ˜ Generate Tool์€ ๊ธฐ์กด ๋‹จ์ผ Tool ์ƒ์„ฑ์ž…๋‹ˆ๋‹ค.
-
@@ -994,31 +992,31 @@
Tool Schema V17 Metadata
-
LLM??Tool???ฌ๋ฐ”๋ฅด๊ฒŒ ? ํƒ?˜๋„๋ก?๊ธฐ๋Šฅยท?ฌ์šฉ ์กฐ๊ฑดยท?œ์™ธ ์กฐ๊ฑดยท?…์ถœ???œํ•œ??๋ถ„๋ฆฌ???…๋ ฅ?ฉ๋‹ˆ??
+
LLM์ด Tool์„ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์„ ํƒํ•˜๋„๋ก ๊ธฐ๋Šฅยท์‚ฌ์šฉ ์กฐ๊ฑดยท์ œ์™ธ ์กฐ๊ฑดยท์ž…์ถœ๋ ฅ ์ œํ•œ์„ ๋ถ„๋ฆฌํ•ด ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.
- +
- +
- +
- +
-
- +
@@ -1046,8 +1044,8 @@
- - + +
@@ -1057,8 +1055,8 @@
- - + +
@@ -1070,7 +1068,7 @@
- +
HTTP only. Must match glow.communication.http.api-list[].name; URL and method are read from Glow YAML.
@@ -1102,12 +1100,12 @@

Document Generator

-

Tool Metadata๋ฅ?๊ธฐ์??ผ๋กœ ๊ฐœ๋ฐœ ?ฐ์ถœ๋ฌ?Excel???์„ฑ?ฉ๋‹ˆ?? ? ํƒ??๋ฌธ์„œ๋ง??Œ์ผ๊ณ??œํŠธ???ฌํ•จ?ฉ๋‹ˆ??

+

Tool Metadata๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๊ฐœ๋ฐœ ์‚ฐ์ถœ๋ฌผ Excel์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. ์„ ํƒ๋œ ๋ฌธ์„œ๋งŒ ํŒŒ์ผ๊ณผ ์‹œํŠธ์— ํฌํ•จ๋ฉ๋‹ˆ๋‹ค.

- -
Gateway??ToolMetadata ๋ชฉ๋ก??์กฐํšŒ?˜๊ณ  ?ˆ์Šต?ˆ๋‹ค.
+ +
Gateway์˜ ToolMetadata ๋ชฉ๋ก์„ ์กฐํšŒํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
@@ -1124,10 +1122,10 @@
- - - - + + + +
@@ -1142,7 +1140,7 @@

Tool Metadata loading...

-

?ฑ๋ก??Tool ๋ชฉ๋ก??๊ฐ€?ธ์˜ค??์ค‘์ž…?ˆ๋‹ค.

+

๋“ฑ๋ก๋œ Tool ๋ชฉ๋ก์„ ๊ฐ€์ ธ์˜ค๋Š” ์ค‘์ž…๋‹ˆ๋‹ค.

SYNC
@@ -1154,16 +1152,16 @@
-
01
?„๋กœ๊ทธ๋žจ?•์˜??/div>
Basic information ยท Runtime ยท Process summary
AUTO
-
02
์ฒ˜๋ฆฌ?ค๊ณ„
Tool metadata + common design
MIXED
-
03
?ธํ„ฐ?˜์ด??/div>
Request In ยท Response Out ยท 2 sheets
2 SHEETS ยท SEPARATE
-
04
๊ฐœ์ •?ด๋ ฅ
Version ยท Date ยท Change information
MANUAL
+
01
ํ”„๋กœ๊ทธ๋žจ์ •์˜์„œ
Basic information ยท Runtime ยท Process summary
AUTO
+
02
์ฒ˜๋ฆฌ์„ค๊ณ„
Tool metadata + common design
MIXED
+
03
์ธํ„ฐํŽ˜์ด์Šค
Request In ยท Response Out ยท 2 sheets
2 SHEETS ยท SEPARATE
+
04
๊ฐœ์ •์ด๋ ฅ
Version ยท Date ยท Change information
MANUAL
-

AUTO: Tool metadata ยท MIXED: Metadata + common design ยท MANUAL: Review required
Output Files ยท ?ธํ„ฐ?˜์ด???•์˜?œ๋Š” ๋ณ„๋„ Excel ?Œ์ผ๋ก??์„ฑ?ฉ๋‹ˆ??

+

AUTO: Tool metadata ยท MIXED: Metadata + common design ยท MANUAL: Review required
Output Files ยท ์ธํ„ฐํŽ˜์ด์Šค ์ •์˜์„œ๋Š” ๋ณ„๋„ Excel ํŒŒ์ผ๋กœ ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค.

-
PROGRAM SPEC
tool_?„๋กœ๊ทธ๋žจ?•์˜??v1.0_YYYYMMDD.xlsx
-
INTERFACE SPEC ยท REQUEST IN / RESPONSE OUT
tool_?ธํ„ฐ?˜์ด?ค์ •?˜์„œ_v1.0_YYYYMMDD.xlsx
+
PROGRAM SPEC
tool_ํ”„๋กœ๊ทธ๋žจ์ •์˜์„œ_v1.0_YYYYMMDD.xlsx
+
INTERFACE SPEC ยท REQUEST IN / RESPONSE OUT
tool_์ธํ„ฐํŽ˜์ด์Šค์ •์˜์„œ_v1.0_YYYYMMDD.xlsx
@@ -1216,26 +1214,26 @@ - +
@@ -369,42 +369,24 @@ localStorage.setItem('mcp_tester_payloads', JSON.stringify(dict)); } - function generateDummyForSchema(schema) { - if (!schema) return null; - if (schema.example !== undefined) return schema.example; - if (schema.examples && Array.isArray(schema.examples) && schema.examples.length > 0) return schema.examples[0]; - if (schema.default !== undefined) return schema.default; - - if (schema.type === 'object') { - const obj = {}; - if (schema.properties) { - for (const [k, v] of Object.entries(schema.properties)) { - obj[k] = generateDummyForSchema(v); - } - } - return obj; - } else if (schema.type === 'array') { - return [generateDummyForSchema(schema.items || {})]; - } else if (schema.type === 'string') { - if (schema.enum && schema.enum.length > 0) return schema.enum[0]; - return "test_string"; - } else if (schema.type === 'integer' || schema.type === 'number') { - return schema.minimum !== undefined ? schema.minimum : 1; - } else if (schema.type === 'boolean') { - return true; - } - return null; - } - function generateDummyPayload(tool) { if (tool._customPayload) return tool._customPayload; - const schema = tool.inputSchema || (tool.inputSchema || tool.parametersSchema); + const schema = tool.parametersSchema; if (!schema || !schema.properties) return {}; - const payload = {}; for (const [key, value] of Object.entries(schema.properties)) { - payload[key] = generateDummyForSchema(value); + if (value.example !== undefined) payload[key] = value.example; + else if (value.examples && Array.isArray(value.examples) && value.examples.length > 0) payload[key] = value.examples[0]; + else if (value.default !== undefined) payload[key] = value.default; + else { + if (value.type === 'string') { + if (value.enum && value.enum.length > 0) payload[key] = value.enum[0]; + else payload[key] = "test_string"; + } else if (value.type === 'integer' || value.type === 'number') payload[key] = value.minimum !== undefined ? value.minimum : 1; + else if (value.type === 'boolean') payload[key] = true; + else payload[key] = null; + } } return payload; } @@ -498,9 +480,9 @@ tool._responseData = res.data; if (tool._isFailed) { - appendLog(`??[ERROR] ${tool.name} failed (${res.status}) - ${res.latency}ms`, 'error'); + appendLog(`โŒ [ERROR] ${tool.name} failed (${res.status}) - ${res.latency}ms`, 'error'); } else { - appendLog(`??[SUCCESS] ${tool.name} completed - ${res.latency}ms`, 'success'); + appendLog(`โœ… [SUCCESS] ${tool.name} completed - ${res.latency}ms`, 'success'); } // Update UI if visible @@ -514,7 +496,6 @@ } async function executeRawCall(name, payload) { - // Auto-coerce payload types based on schema to prevent JSON validation errors const tool = allTools.find(t => t.name === name); if (tool && tool.inputSchema && tool.inputSchema.properties) { const props = tool.inputSchema.properties; @@ -780,7 +761,7 @@ async function executeRawCall(name, payload) { } function renderSmartForm(tool, payloadToUse = null) { - const schema = (tool.inputSchema || tool.parametersSchema); + const schema = tool.parametersSchema; const form = document.getElementById('payloadFormContainer'); form.innerHTML = ''; @@ -868,18 +849,18 @@ async function executeRawCall(name, payload) { if (currentEditIndex === -1) return; const tool = allTools[currentEditIndex]; - // ๋กœ์ปฌ ?คํ† ๋ฆฌ์??์„œ ?? œ + // ๋กœ์ปฌ ์Šคํ† ๋ฆฌ์ง€์—์„œ ์‚ญ์ œ const savedPayloads = JSON.parse(localStorage.getItem('mcp_tester_payloads') || '{}'); delete savedPayloads[tool.name]; localStorage.setItem('mcp_tester_payloads', JSON.stringify(savedPayloads)); - // ?ฐํ????ํƒœ ์ดˆ๊ธฐ?? + // ๋Ÿฐํƒ€์ž„ ์ƒํƒœ ์ดˆ๊ธฐํ™” tool._customPayload = null; - // ???คํ‚ค๋ง?๊ธฐ๋ฐ˜ ๊ธฐ๋ณธ ?˜์ด๋กœ๋“œ ?์„ฑ + // ์ƒˆ ์Šคํ‚ค๋งˆ ๊ธฐ๋ฐ˜ ๊ธฐ๋ณธ ํŽ˜์ด๋กœ๋“œ ์ƒ์„ฑ const freshPayload = generateDummyPayload(tool); - // UI ?…๋ฐ?ดํŠธ + // UI ์—…๋ฐ์ดํŠธ document.getElementById('payloadEditor').value = JSON.stringify(freshPayload, null, 2); renderSmartForm(tool, freshPayload); } @@ -1082,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.inputSchema || tool.parametersSchema)?.properties || {}; - const required = (tool.inputSchema || tool.parametersSchema)?.required || []; + const schemaProps = tool.parametersSchema?.properties || {}; + const required = tool.parametersSchema?.required || []; paths[`/mcp/api/v1/tools/call?name=${tool.name}`] = { post: { @@ -1167,8 +1148,8 @@ async function executeRawCall(name, payload) { md += `### \`${tool.name}\`\n\n`; md += `**Description:** ${tool.description || 'N/A'}\n\n`; - const props = (tool.inputSchema || tool.parametersSchema)?.properties || {}; - const reqs = (tool.inputSchema || tool.parametersSchema)?.required || []; + const props = tool.parametersSchema?.properties || {}; + const reqs = tool.parametersSchema?.required || []; if (Object.keys(props).length > 0) { md += `#### Parameters\n\n`; @@ -1176,7 +1157,7 @@ async function executeRawCall(name, payload) { md += `|------|------|----------|-------------|---------|\n`; Object.keys(props).forEach(p => { const pData = props[p]; - const isReq = reqs.includes(p) ? '??Yes' : '??No'; + const isReq = reqs.includes(p) ? 'โœ… Yes' : 'โŒ No'; let example = pData.example !== undefined ? pData.example : (pData.examples ? pData.examples[0] : ''); if (typeof example === 'object') example = JSON.stringify(example); md += `| \`${p}\` | \`${pData.type || 'string'}\` | ${isReq} | ${pData.description || ''} | \`${example}\` |\n`;