refactor: sync ToolMetadata and HTML scaffolding UI with new @McpFunction attributes (subToolName->name, name->displayName)

This commit is contained in:
jade
2026-07-11 01:20:27 +09:00
parent d4232e6d7f
commit 588a783568
7 changed files with 17 additions and 18 deletions

View File

@@ -38,8 +38,8 @@ public class ToolMetadata {
// 1. Tool 기본 정보 // 1. Tool 기본 정보
private String uid; // UUID 형식의 고유 식별자 private String uid; // UUID 형식의 고유 식별자
private String semver; // 버전 (예: 1.0.0) private String semver; // 버전 (예: 1.0.0)
private String name; // 사람이 읽는 라벨 (1-128자) private String displayName; // 사람이 읽는 라벨 (1-128자)
private String subToolName; // MCP 서브툴 명칭 (64자 이하, 예: CustomerSearchTool) private String name; // MCP 서브툴 명칭 (64자 이하, 예: CustomerSearchTool)
private String description; // 툴의 목적 및 설명 (LLM 프롬프트에 활용 가능) private String description; // 툴의 목적 및 설명 (LLM 프롬프트에 활용 가능)
// 2. 파라미터 스키마 (JSON Schema 형태의 Map) // 2. 파라미터 스키마 (JSON Schema 형태의 Map)

View File

@@ -160,7 +160,6 @@ public class PodScaffolder {
# API 보안 키 설정 # API 보안 키 설정
mcp.security.api-keys.SHINHAN_MCP_SECRET_KEY_2026=mcp-client-1 mcp.security.api-keys.SHINHAN_MCP_SECRET_KEY_2026=mcp-client-1
mcp.security.api-keys.SHINHAN_MCP_TEST_KEY_9999=mcp-client-2
mcp.security.tenant-domains.mcp-client-1=CUSTOMER,COMMON mcp.security.tenant-domains.mcp-client-1=CUSTOMER,COMMON
mcp.security.tenant-domains.mcp-client-2=ALL mcp.security.tenant-domains.mcp-client-2=ALL

View File

@@ -38,8 +38,8 @@ public class ToolMetadata {
// 1. Tool 기본 정보 // 1. Tool 기본 정보
private String uid; // UUID 형식의 고유 식별자 private String uid; // UUID 형식의 고유 식별자
private String semver; // 버전 (예: 1.0.0) private String semver; // 버전 (예: 1.0.0)
private String name; // 사람이 읽는 라벨 (1-128자) private String displayName; // 사람이 읽는 라벨 (1-128자)
private String subToolName; // MCP 서브툴 명칭 (64자 이하, 예: CustomerSearchTool) private String name; // MCP 서브툴 명칭 (64자 이하, 예: CustomerSearchTool)
private String description; // 툴의 목적 및 설명 (LLM 프롬프트에 활용 가능) private String description; // 툴의 목적 및 설명 (LLM 프롬프트에 활용 가능)
// 2. 파라미터 스키마 (JSON Schema 형태의 Map) // 2. 파라미터 스키마 (JSON Schema 형태의 Map)

View File

@@ -387,7 +387,7 @@
<form id="editToolForm"> <form id="editToolForm">
<div class="mb-3"> <div class="mb-3">
<label class="form-label">서브툴 이름 (수정불가)</label> <label class="form-label">서브툴 이름 (수정불가)</label>
<input type="text" class="form-control" id="editSubToolName" name="subToolName" readonly> <input type="text" class="form-control" id="editToolName" name="toolName" readonly>
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label class="form-label">소속 도메인 그룹</label> <label class="form-label">소속 도메인 그룹</label>
@@ -515,8 +515,8 @@
<tr class="tool-row"> <tr class="tool-row">
<td class="text-nowrap"><span class="badge bg-secondary tool-group">${t.categoryKey || 'UNKNOWN'}</span></td> <td class="text-nowrap"><span class="badge bg-secondary tool-group">${t.categoryKey || 'UNKNOWN'}</span></td>
<td class="fw-bold text-primary text-break tool-name"> <td class="fw-bold text-primary text-break tool-name">
<a href="javascript:void(0)" onclick="openEditModal('${t.subToolName}', '${t.categoryKey}', '${escDesc}', ${isReg})" class="text-decoration-none"> <a href="javascript:void(0)" onclick="openEditModal('${t.name}', '${t.categoryKey}', '${escDesc}', ${isReg})" class="text-decoration-none">
${t.subToolName} ${t.name}
</a> </a>
${badgeHtml} ${badgeHtml}
</td> </td>
@@ -555,8 +555,8 @@
} }
let editModalInstance = null; let editModalInstance = null;
function openEditModal(subToolName, categoryKey, description, isReg) { function openEditModal(toolName, categoryKey, description, isReg) {
document.getElementById('editSubToolName').value = subToolName; document.getElementById('editToolName').value = toolName;
document.getElementById('editCategoryKey').value = categoryKey !== 'null' ? categoryKey : ''; document.getElementById('editCategoryKey').value = categoryKey !== 'null' ? categoryKey : '';
document.getElementById('editDescription').value = description; document.getElementById('editDescription').value = description;
document.getElementById('editRegister').value = isReg ? 'true' : 'false'; document.getElementById('editRegister').value = isReg ? 'true' : 'false';
@@ -568,7 +568,7 @@
} }
function submitToolUpdate() { function submitToolUpdate() {
const subToolName = document.getElementById('editSubToolName').value; const toolName = document.getElementById('editToolName').value;
const categoryKey = document.getElementById('editCategoryKey').value; const categoryKey = document.getElementById('editCategoryKey').value;
const description = document.getElementById('editDescription').value; const description = document.getElementById('editDescription').value;
const register = document.getElementById('editRegister').value; const register = document.getElementById('editRegister').value;
@@ -582,7 +582,7 @@
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ body: JSON.stringify({
subToolName: subToolName, toolName: toolName,
categoryKey: categoryKey, categoryKey: categoryKey,
description: description, description: description,
register: register register: register

View File

@@ -317,7 +317,7 @@
<div class="absolute top-4 right-4 px-2 py-0.5 rounded text-[9px] font-bold font-mono border tracking-wider ${typeClass}"> <div class="absolute top-4 right-4 px-2 py-0.5 rounded text-[9px] font-bold font-mono border tracking-wider ${typeClass}">
${tool.integrationType || 'DIRECT'} ${tool.integrationType || 'DIRECT'}
</div> </div>
<h3 class="text-lg font-bold text-white mb-1 pr-16">${tool.subToolName}</h3> <h3 class="text-lg font-bold text-white mb-1 pr-16">${tool.name}</h3>
<p class="text-sm text-slate-400 leading-relaxed min-h-[40px]">${tool.description || '설명이 없습니다.'}</p> <p class="text-sm text-slate-400 leading-relaxed min-h-[40px]">${tool.description || '설명이 없습니다.'}</p>
${paramHtml} ${paramHtml}

View File

@@ -31,8 +31,8 @@ public class ToolMetadata {
// 1. Tool 기본 정보 // 1. Tool 기본 정보
private String uid; // UUID 형식의 고유 식별자 private String uid; // UUID 형식의 고유 식별자
private String semver; // 버전 (예: 1.0.0) private String semver; // 버전 (예: 1.0.0)
private String name; // 사람이 읽는 라벨 (1-128자) private String displayName; // 사람이 읽는 라벨 (1-128자)
private String subToolName; // MCP 서브툴 명칭 (64자 이하, 예: CustomerSearchTool) private String name; // MCP 서브툴 명칭 (64자 이하, 예: CustomerSearchTool)
private String description; // 툴의 목적 및 설명 (LLM 프롬프트에 활용 가능) private String description; // 툴의 목적 및 설명 (LLM 프롬프트에 활용 가능)
// 2. 파라미터 스키마 (JSON Schema 형태의 Map) // 2. 파라미터 스키마 (JSON Schema 형태의 Map)

View File

@@ -93,8 +93,8 @@ public class ToolRegistryHeartbeatSender {
ToolMetadata meta = new ToolMetadata(); ToolMetadata meta = new ToolMetadata();
meta.setUid(java.util.UUID.nameUUIDFromBytes(subToolName.getBytes()).toString()); meta.setUid(java.util.UUID.nameUUIDFromBytes(subToolName.getBytes()).toString());
meta.setName(baseName); meta.setDisplayName(baseName);
meta.setSubToolName(subToolName); meta.setName(subToolName);
meta.setSemver("1.0.0"); meta.setSemver("1.0.0");
meta.setDescription(functionAnnotation.description()); meta.setDescription(functionAnnotation.description());
meta.setCategoryKey(toolAnnotation.categoryKey()); meta.setCategoryKey(toolAnnotation.categoryKey());