forked from kimhyungsik/ax_hub_mcp_tool
refactor: rename McpFunction attributes (subToolName -> name, parameterSchema -> inputSchema) and remove hardcoded API key
This commit is contained in:
@@ -33,7 +33,7 @@ public class McpBridge {
|
|||||||
try {
|
try {
|
||||||
HttpRequest req = HttpRequest.newBuilder()
|
HttpRequest req = HttpRequest.newBuilder()
|
||||||
.uri(URI.create("http://localhost:8081/mcp/api/v1/tools/list"))
|
.uri(URI.create("http://localhost:8081/mcp/api/v1/tools/list"))
|
||||||
.header("X-API-KEY", "SHINHAN_MCP_TEST_KEY_9999")
|
|
||||||
.GET()
|
.GET()
|
||||||
.build();
|
.build();
|
||||||
HttpResponse<String> response = client.send(req, HttpResponse.BodyHandlers.ofString());
|
HttpResponse<String> response = client.send(req, HttpResponse.BodyHandlers.ofString());
|
||||||
@@ -44,7 +44,7 @@ public class McpBridge {
|
|||||||
String rawJson = response.body();
|
String rawJson = response.body();
|
||||||
// For simplicity, we can just proxy the response if it matches closely, but it doesn't.
|
// For simplicity, we can just proxy the response if it matches closely, but it doesn't.
|
||||||
// Let's just do a naive conversion by replacing "subToolName" with "name" and "parametersSchema" with "inputSchema"
|
// Let's just do a naive conversion by replacing "subToolName" with "name" and "parametersSchema" with "inputSchema"
|
||||||
String transformed = rawJson.replace("\"name\"", "\"displayName\"").replace("\"subToolName\"", "\"name\"").replace("\"parametersSchema\"", "\"inputSchema\"");
|
String transformed = rawJson;
|
||||||
// Add type: "object" to inputSchema if missing - too complex with string replace, let's hope axhub-gateway already provides correct schema
|
// Add type: "object" to inputSchema if missing - too complex with string replace, let's hope axhub-gateway already provides correct schema
|
||||||
|
|
||||||
// The result format expects: {"tools": [ ... ]}
|
// The result format expects: {"tools": [ ... ]}
|
||||||
@@ -68,7 +68,7 @@ public class McpBridge {
|
|||||||
.uri(URI.create("http://localhost:8081/mcp/api/v1/tools/call"))
|
.uri(URI.create("http://localhost:8081/mcp/api/v1/tools/call"))
|
||||||
.header("Content-Type", "application/json")
|
.header("Content-Type", "application/json")
|
||||||
.header("X-Agent-Id", "Antigravity")
|
.header("X-Agent-Id", "Antigravity")
|
||||||
.header("X-API-KEY", "SHINHAN_MCP_TEST_KEY_9999")
|
|
||||||
.POST(HttpRequest.BodyPublishers.ofString(line))
|
.POST(HttpRequest.BodyPublishers.ofString(line))
|
||||||
.build();
|
.build();
|
||||||
HttpResponse<String> response = client.send(req, HttpResponse.BodyHandlers.ofString());
|
HttpResponse<String> response = client.send(req, HttpResponse.BodyHandlers.ofString());
|
||||||
|
|||||||
@@ -186,8 +186,8 @@ public class ToolScaffolder {
|
|||||||
public class %sService extends AbstractMcpToolService {
|
public class %sService extends AbstractMcpToolService {
|
||||||
|
|
||||||
@McpFunction(
|
@McpFunction(
|
||||||
name = "%s 툴",
|
displayName = "%s 툴",
|
||||||
subToolName = "%s",
|
name = "%s",
|
||||||
description = "%s",
|
description = "%s",
|
||||||
prompt = "%s",
|
prompt = "%s",
|
||||||
mappingId = "%s",
|
mappingId = "%s",
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class ExecuteService {
|
|||||||
return restClient.post()
|
return restClient.post()
|
||||||
.uri(url)
|
.uri(url)
|
||||||
.contentType(MediaType.APPLICATION_JSON)
|
.contentType(MediaType.APPLICATION_JSON)
|
||||||
.header("X-API-KEY", "SHINHAN_MCP_TEST_KEY_9999") // TODO: Use actual tenant's key
|
// TODO: Use actual tenant's key
|
||||||
.header("X-Trace-Id", java.util.UUID.randomUUID().toString())
|
.header("X-Trace-Id", java.util.UUID.randomUUID().toString())
|
||||||
.body(payload)
|
.body(payload)
|
||||||
.retrieve()
|
.retrieve()
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ eims.mcistring.url=http://localhost:${server.port}/api/mock/esb/string
|
|||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
|||||||
@@ -190,7 +190,7 @@
|
|||||||
async function fetchTools() {
|
async function fetchTools() {
|
||||||
try {
|
try {
|
||||||
const response = await fetch('/mcp/api/v1/tools/list', {
|
const response = await fetch('/mcp/api/v1/tools/list', {
|
||||||
headers: { 'X-API-KEY': 'SHINHAN_MCP_TEST_KEY_9999' }
|
|
||||||
});
|
});
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
const tools = data.result?.tools || [];
|
const tools = data.result?.tools || [];
|
||||||
|
|||||||
@@ -294,7 +294,7 @@
|
|||||||
async function fetchTools() {
|
async function fetchTools() {
|
||||||
try {
|
try {
|
||||||
const response = await fetch('/mcp/api/v1/tools/list', {
|
const response = await fetch('/mcp/api/v1/tools/list', {
|
||||||
headers: { 'X-API-KEY': 'SHINHAN_MCP_TEST_KEY_9999' }
|
|
||||||
});
|
});
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
@@ -426,7 +426,7 @@
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'X-API-KEY': 'SHINHAN_MCP_TEST_KEY_9999',
|
|
||||||
'X-Trace-Id': "MCP-REQ-" + Math.floor(Math.random() * 90000 + 10000),
|
'X-Trace-Id': "MCP-REQ-" + Math.floor(Math.random() * 90000 + 10000),
|
||||||
'X-Agent-Id': document.getElementById('agentId').value,
|
'X-Agent-Id': document.getElementById('agentId').value,
|
||||||
'X-User-Prompt': encodeURIComponent(document.getElementById('userPrompt').value || document.getElementById('userPrompt').placeholder)
|
'X-User-Prompt': encodeURIComponent(document.getElementById('userPrompt').value || document.getElementById('userPrompt').placeholder)
|
||||||
|
|||||||
@@ -303,7 +303,7 @@
|
|||||||
async function fetchTools() {
|
async function fetchTools() {
|
||||||
try {
|
try {
|
||||||
const response = await fetch('/mcp/api/v1/tools/list', {
|
const response = await fetch('/mcp/api/v1/tools/list', {
|
||||||
headers: { 'X-API-KEY': 'SHINHAN_MCP_TEST_KEY_9999' }
|
|
||||||
});
|
});
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
@@ -503,7 +503,7 @@
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'X-API-KEY': 'SHINHAN_MCP_TEST_KEY_9999',
|
|
||||||
'X-Trace-Id': "MCP-REQ-" + Math.floor(Math.random() * 90000 + 10000),
|
'X-Trace-Id': "MCP-REQ-" + Math.floor(Math.random() * 90000 + 10000),
|
||||||
'X-Agent-Id': document.getElementById('agentId').value,
|
'X-Agent-Id': document.getElementById('agentId').value,
|
||||||
'X-User-Prompt': encodeURIComponent(document.getElementById('userPrompt').value || '테스트')
|
'X-User-Prompt': encodeURIComponent(document.getElementById('userPrompt').value || '테스트')
|
||||||
|
|||||||
@@ -313,7 +313,7 @@
|
|||||||
async function fetchTools() {
|
async function fetchTools() {
|
||||||
try {
|
try {
|
||||||
const response = await fetch('/mcp/api/v1/tools/list', {
|
const response = await fetch('/mcp/api/v1/tools/list', {
|
||||||
headers: { 'X-API-KEY': 'SHINHAN_MCP_TEST_KEY_9999' }
|
|
||||||
});
|
});
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
@@ -454,7 +454,7 @@
|
|||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
const response = await fetch('/mcp/api/v1/tools/call', {
|
const response = await fetch('/mcp/api/v1/tools/call', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json', 'X-API-KEY': 'SHINHAN_MCP_TEST_KEY_9999' },
|
headers: { 'Content-Type': 'application/json', },
|
||||||
body: JSON.stringify(payload)
|
body: JSON.stringify(payload)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ import java.lang.annotation.*;
|
|||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Documented
|
@Documented
|
||||||
public @interface McpFunction {
|
public @interface McpFunction {
|
||||||
String name(); // 사람이 읽는 라벨 (예: "고객 조회 툴")
|
String displayName(); // 사람이 읽는 라벨 (예: "고객 조회 툴")
|
||||||
String subToolName(); // MCP 서브툴 명칭 (예: "customer_search")
|
String name(); // MCP 서브툴 명칭 (예: "customer_search")
|
||||||
String description();
|
String description();
|
||||||
String prompt() default "";
|
String prompt() default "";
|
||||||
String mappingId() default "";
|
String mappingId() default "";
|
||||||
|
|
||||||
// 추가: 해당 함수가 요구하는 비즈니스 파라미터(JSON 형태의 properties)를 정의
|
// 추가: 해당 함수가 요구하는 비즈니스 파라미터(JSON 형태의 properties)를 정의
|
||||||
String parameterSchema() default "{}";
|
String inputSchema() default "{}";
|
||||||
|
|
||||||
// 추가: Redis 자동 등록 및 Heartbeat 대상 여부 제어
|
// 추가: Redis 자동 등록 및 Heartbeat 대상 여부 제어
|
||||||
boolean register() default true;
|
boolean register() default true;
|
||||||
|
|||||||
@@ -80,8 +80,8 @@ public class ToolRegistryHeartbeatSender {
|
|||||||
for (Method method : targetClass.getDeclaredMethods()) {
|
for (Method method : targetClass.getDeclaredMethods()) {
|
||||||
McpFunction functionAnnotation = AnnotationUtils.findAnnotation(method, McpFunction.class);
|
McpFunction functionAnnotation = AnnotationUtils.findAnnotation(method, McpFunction.class);
|
||||||
if (functionAnnotation != null) {
|
if (functionAnnotation != null) {
|
||||||
String baseName = functionAnnotation.name();
|
String baseName = functionAnnotation.displayName();
|
||||||
String rawSubToolName = functionAnnotation.subToolName();
|
String rawSubToolName = functionAnnotation.name();
|
||||||
String subToolName = mcpProperties.getNamespace() != null && !mcpProperties.getNamespace().isEmpty()
|
String subToolName = mcpProperties.getNamespace() != null && !mcpProperties.getNamespace().isEmpty()
|
||||||
? mcpProperties.getNamespace() + "_" + rawSubToolName
|
? mcpProperties.getNamespace() + "_" + rawSubToolName
|
||||||
: rawSubToolName;
|
: rawSubToolName;
|
||||||
@@ -144,7 +144,7 @@ public class ToolRegistryHeartbeatSender {
|
|||||||
org.springframework.http.ResponseEntity<String> response = restClient.post()
|
org.springframework.http.ResponseEntity<String> response = restClient.post()
|
||||||
.uri(gatewayUrl + "/mcp/api/v1/registry/heartbeat")
|
.uri(gatewayUrl + "/mcp/api/v1/registry/heartbeat")
|
||||||
.header("Content-Type", "application/json")
|
.header("Content-Type", "application/json")
|
||||||
.header("X-API-KEY", "SHINHAN_MCP_TEST_KEY_9999")
|
|
||||||
.body(tool.getUid())
|
.body(tool.getUid())
|
||||||
.retrieve()
|
.retrieve()
|
||||||
.toEntity(String.class);
|
.toEntity(String.class);
|
||||||
@@ -164,7 +164,7 @@ public class ToolRegistryHeartbeatSender {
|
|||||||
restClient.post()
|
restClient.post()
|
||||||
.uri(gatewayUrl + "/mcp/api/v1/registry/register")
|
.uri(gatewayUrl + "/mcp/api/v1/registry/register")
|
||||||
.header("Content-Type", "application/json")
|
.header("Content-Type", "application/json")
|
||||||
.header("X-API-KEY", "SHINHAN_MCP_TEST_KEY_9999")
|
|
||||||
.body(tool)
|
.body(tool)
|
||||||
.retrieve()
|
.retrieve()
|
||||||
.toBodilessEntity();
|
.toBodilessEntity();
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import java.util.Map;
|
|||||||
@McpTool(routingType = "EAI", categoryKey = "notification")
|
@McpTool(routingType = "EAI", categoryKey = "notification")
|
||||||
public class EmailToolService extends AbstractMcpToolService {
|
public class EmailToolService extends AbstractMcpToolService {
|
||||||
|
|
||||||
@McpFunction(name = "send_email 툴", subToolName = "send_email", description = "이메일 발송", prompt = "고객에게 이메일을 발송해줘.", mappingId = "EMAIL_SEND_001")
|
@McpFunction(displayName = "send_email 툴", name = "send_email", description = "이메일 발송", prompt = "고객에게 이메일을 발송해줘.", mappingId = "EMAIL_SEND_001")
|
||||||
public Object sendEmail(EmailSendReq req) {
|
public Object sendEmail(EmailSendReq req) {
|
||||||
log.info("[Email] 이메일 발송 요청 수신. 수신자: {}", req.getEmailAddress());
|
log.info("[Email] 이메일 발송 요청 수신. 수신자: {}", req.getEmailAddress());
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ eims.mcistring.url=http://localhost:${server.port}/api/mock/esb/string
|
|||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import java.util.Map;
|
|||||||
@McpTool(routingType = "MCI", categoryKey = "common")
|
@McpTool(routingType = "MCI", categoryKey = "common")
|
||||||
public class BalanceService extends AbstractMcpToolService {
|
public class BalanceService extends AbstractMcpToolService {
|
||||||
|
|
||||||
@McpFunction(name = "balance 툴", subToolName = "balance",
|
@McpFunction(displayName = "balance 툴", name = "balance",
|
||||||
description = "고객의 계좌 잔액을 조회합니다.",
|
description = "고객의 계좌 잔액을 조회합니다.",
|
||||||
prompt = "고객 계좌 잔액을 조회해줘.",
|
prompt = "고객 계좌 잔액을 조회해줘.",
|
||||||
mappingId = "ACC_001"
|
mappingId = "ACC_001"
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ import io.shinhanlife.axhub.biz.mcp.tool.dto.BillingProcessReq;
|
|||||||
@lombok.extern.slf4j.Slf4j
|
@lombok.extern.slf4j.Slf4j
|
||||||
public class BillingProcessService extends AbstractMcpToolService {
|
public class BillingProcessService extends AbstractMcpToolService {
|
||||||
|
|
||||||
@McpFunction(name = "status 툴", subToolName = "status", description = "청구심사 상태 조회", prompt = "현재 접수된 청구건 상태를 알려줘.", mappingId = "BILL_001")
|
@McpFunction(displayName = "status 툴", name = "status", description = "청구심사 상태 조회", prompt = "현재 접수된 청구건 상태를 알려줘.", mappingId = "BILL_001")
|
||||||
public Object getStatus(BillingStatusReq data) {
|
public Object getStatus(BillingStatusReq data) {
|
||||||
return executeBillingLogic("BILL_001", data);
|
return executeBillingLogic("BILL_001", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@McpFunction(name = "process 툴", subToolName = "process", description = "청구 처리", prompt = "현재 접수된 청구건에 대한 심사 처리를 진행해.", mappingId = "BILL_002")
|
@McpFunction(displayName = "process 툴", name = "process", description = "청구 처리", prompt = "현재 접수된 청구건에 대한 심사 처리를 진행해.", mappingId = "BILL_002")
|
||||||
public Object processBilling(BillingProcessReq data) {
|
public Object processBilling(BillingProcessReq data) {
|
||||||
return executeBillingLogic("BILL_002", data);
|
return executeBillingLogic("BILL_002", data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ import io.shinhanlife.axhub.biz.mcp.tool.dto.BondIssueReq;
|
|||||||
*/
|
*/
|
||||||
public class BondIssueService extends AbstractMcpToolService {
|
public class BondIssueService extends AbstractMcpToolService {
|
||||||
|
|
||||||
@McpFunction(name = "check 툴", subToolName = "check", register = true, description = "발행 가능 여부 조회 테스트", prompt = "디지털 증권 발행 한도가 충분한지 확인해줘.", mappingId = "BOND_001")
|
@McpFunction(displayName = "check 툴", name = "check", register = true, description = "발행 가능 여부 조회 테스트", prompt = "디지털 증권 발행 한도가 충분한지 확인해줘.", mappingId = "BOND_001")
|
||||||
public Object check(BondCheckReq data) {
|
public Object check(BondCheckReq data) {
|
||||||
return executeLegacy("EAI", "BOND_001", data);
|
return executeLegacy("EAI", "BOND_001", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@McpFunction(name = "issue 툴", subToolName = "issue", register = true, description = "증권 발행 테스트1", prompt = "디지털 증권 발행 프로세스를 실행해.", mappingId = "BOND_002")
|
@McpFunction(displayName = "issue 툴", name = "issue", register = true, description = "증권 발행 테스트1", prompt = "디지털 증권 발행 프로세스를 실행해.", mappingId = "BOND_002")
|
||||||
public Object issue(BondIssueReq data) {
|
public Object issue(BondIssueReq data) {
|
||||||
return executeLegacy("EAI", "BOND_002", data);
|
return executeLegacy("EAI", "BOND_002", data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,17 +26,17 @@ import io.shinhanlife.axhub.biz.mcp.tool.dto.LeaveCountReq;
|
|||||||
*/
|
*/
|
||||||
public class CommonUtilityService extends AbstractMcpToolService {
|
public class CommonUtilityService extends AbstractMcpToolService {
|
||||||
|
|
||||||
@McpFunction(name = "register_vacation 툴", subToolName = "register_vacation", description = "휴가 등록", prompt = "내일 하루 연차 휴가를 등록해줘.", mappingId = "HR_VAC_01")
|
@McpFunction(displayName = "register_vacation 툴", name = "register_vacation", description = "휴가 등록", prompt = "내일 하루 연차 휴가를 등록해줘.", mappingId = "HR_VAC_01")
|
||||||
public Object registerVacation(VacationRegisterReq data) {
|
public Object registerVacation(VacationRegisterReq data) {
|
||||||
return executeLegacy("HTTP", "HR_VAC_01", data);
|
return executeLegacy("HTTP", "HR_VAC_01", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@McpFunction(name = "get_leave_count 툴", subToolName = "get_leave_count", description = "연차 갯수 조회", prompt = "현재 사용 가능한 남은 연차 일수를 알려줘.", mappingId = "HR_VAC_02")
|
@McpFunction(displayName = "get_leave_count 툴", name = "get_leave_count", description = "연차 갯수 조회", prompt = "현재 사용 가능한 남은 연차 일수를 알려줘.", mappingId = "HR_VAC_02")
|
||||||
public Object getLeaveCount(LeaveCountReq data) {
|
public Object getLeaveCount(LeaveCountReq data) {
|
||||||
return executeLegacy("HTTP", "HR_VAC_02", data);
|
return executeLegacy("HTTP", "HR_VAC_02", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@McpFunction(name = "secret_tool 툴", subToolName = "secret_tool", description = "비공개 툴 테스트", prompt = "숨겨진 툴 강제 호출", mappingId = "SECRET_001", visible = false)
|
@McpFunction(displayName = "secret_tool 툴", name = "secret_tool", description = "비공개 툴 테스트", prompt = "숨겨진 툴 강제 호출", mappingId = "SECRET_001", visible = false)
|
||||||
public Object secretTool(LeaveCountReq data) {
|
public Object secretTool(LeaveCountReq data) {
|
||||||
return executeLegacy("HTTP", "SECRET_001", data);
|
return executeLegacy("HTTP", "SECRET_001", data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ import io.shinhanlife.axhub.biz.mcp.tool.dto.ContractDetailReq;
|
|||||||
*/
|
*/
|
||||||
public class ContractInquiryService extends AbstractMcpToolService {
|
public class ContractInquiryService extends AbstractMcpToolService {
|
||||||
|
|
||||||
@McpFunction(name = "contract_status 툴", subToolName = "contract_status", description = "계약상태 조회", prompt = "김신한 고객의 현재 계약 상태를 조회해줘.", mappingId = "CNTR_001")
|
@McpFunction(displayName = "contract_status 툴", name = "contract_status", description = "계약상태 조회", prompt = "김신한 고객의 현재 계약 상태를 조회해줘.", mappingId = "CNTR_001")
|
||||||
public Object getStatus(ContractStatusReq data) {
|
public Object getStatus(ContractStatusReq data) {
|
||||||
return executeLegacy("HTTP", "CNTR_001", data);
|
return executeLegacy("HTTP", "CNTR_001", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@McpFunction(name = "contract_detail 툴", subToolName = "contract_detail", description = "계약상세 조회", prompt = "김신한 고객의 계약 상세 내역을 알려줘.", mappingId = "CNTR_002")
|
@McpFunction(displayName = "contract_detail 툴", name = "contract_detail", description = "계약상세 조회", prompt = "김신한 고객의 계약 상세 내역을 알려줘.", mappingId = "CNTR_002")
|
||||||
public Object getDetail(ContractDetailReq data) {
|
public Object getDetail(ContractDetailReq data) {
|
||||||
return executeLegacy("HTTP", "CNTR_002", data);
|
return executeLegacy("HTTP", "CNTR_002", data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ import io.shinhanlife.axhub.biz.mcp.tool.dto.CustomerDetailReq;
|
|||||||
*/
|
*/
|
||||||
public class CustomerInfoService extends AbstractMcpToolService {
|
public class CustomerInfoService extends AbstractMcpToolService {
|
||||||
|
|
||||||
@McpFunction(name = "grade 툴", subToolName = "grade", description = "고객등급 조회", prompt = "이 고객의 VIP 등급을 조회해줘.", mappingId = "CRM_001")
|
@McpFunction(displayName = "grade 툴", name = "grade", description = "고객등급 조회", prompt = "이 고객의 VIP 등급을 조회해줘.", mappingId = "CRM_001")
|
||||||
public Object getGrade(CustomerGradeReq req) {
|
public Object getGrade(CustomerGradeReq req) {
|
||||||
return executeLegacy("TCP", "CRM_001", req);
|
return executeLegacy("TCP", "CRM_001", req);
|
||||||
}
|
}
|
||||||
|
|
||||||
@McpFunction(name = "detail 툴", subToolName = "detail", description = "고객상세 정보 조회", prompt = "이 고객의 상세 기본정보(주소, 연락처 등)를 알려줘.", mappingId = "CRM_002")
|
@McpFunction(displayName = "detail 툴", name = "detail", description = "고객상세 정보 조회", prompt = "이 고객의 상세 기본정보(주소, 연락처 등)를 알려줘.", mappingId = "CRM_002")
|
||||||
public Object getDetail(CustomerDetailReq data) {
|
public Object getDetail(CustomerDetailReq data) {
|
||||||
return executeLegacy("TCP", "CRM_002", data);
|
return executeLegacy("TCP", "CRM_002", data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import java.util.Map;
|
|||||||
)
|
)
|
||||||
public class SampleStringToolService extends AbstractMcpToolService {
|
public class SampleStringToolService extends AbstractMcpToolService {
|
||||||
|
|
||||||
@McpFunction(name = "get_sample_string 툴", subToolName = "get_sample_string",
|
@McpFunction(displayName = "get_sample_string 툴", name = "get_sample_string",
|
||||||
description = "MCI String 버전과 GlowTrgmField 파싱을 테스트하는 샘플 툴입니다.",
|
description = "MCI String 버전과 GlowTrgmField 파싱을 테스트하는 샘플 툴입니다.",
|
||||||
prompt = "MCI 전문(String) 연계 및 고정 길이 파싱 테스트 해줘.",
|
prompt = "MCI 전문(String) 연계 및 고정 길이 파싱 테스트 해줘.",
|
||||||
mappingId = "TRGM_001"
|
mappingId = "TRGM_001"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public class TemplateUtilityService extends AbstractMcpToolService {
|
public class TemplateUtilityService extends AbstractMcpToolService {
|
||||||
|
|
||||||
@McpFunction(name = "get_template_file_url 툴", subToolName = "get_template_file_url",
|
@McpFunction(displayName = "get_template_file_url 툴", name = "get_template_file_url",
|
||||||
description = "특정 템플릿의 양식 파일(엑셀, 워드 등)을 다운로드 받을 수 있는 시스템 URL을 반환합니다. AI는 이 URL을 사용자에게 마크다운 링크 형태로 제공해야 합니다.",
|
description = "특정 템플릿의 양식 파일(엑셀, 워드 등)을 다운로드 받을 수 있는 시스템 URL을 반환합니다. AI는 이 URL을 사용자에게 마크다운 링크 형태로 제공해야 합니다.",
|
||||||
prompt = "요청하신 템플릿 양식 파일 다운로드 URL은 다음과 같습니다. 클릭하여 다운로드하세요:",
|
prompt = "요청하신 템플릿 양식 파일 다운로드 URL은 다음과 같습니다. 클릭하여 다운로드하세요:",
|
||||||
register = false
|
register = false
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ eims.mcistring.url=http://localhost:${server.port}/api/mock/esb/string
|
|||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import java.util.UUID;
|
|||||||
)
|
)
|
||||||
public class PaymentApprovalService extends AbstractMcpToolService {
|
public class PaymentApprovalService extends AbstractMcpToolService {
|
||||||
|
|
||||||
@McpFunction(name = "paymentapproval 툴", subToolName = "paymentapproval",
|
@McpFunction(displayName = "paymentapproval 툴", name = "paymentapproval",
|
||||||
description = "결제 승인 처리",
|
description = "결제 승인 처리",
|
||||||
prompt = "결제 승인 처리 해줘.",
|
prompt = "결제 승인 처리 해줘.",
|
||||||
mappingId = "PAY_001"
|
mappingId = "PAY_001"
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ eims.mcistring.url=http://localhost:${server.port}/api/mock/esb/string
|
|||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import java.util.Map;
|
|||||||
@McpTool(routingType = "EAI", categoryKey = "notification")
|
@McpTool(routingType = "EAI", categoryKey = "notification")
|
||||||
public class SmsToolService extends AbstractMcpToolService {
|
public class SmsToolService extends AbstractMcpToolService {
|
||||||
|
|
||||||
@McpFunction(name = "send_sms 툴", subToolName = "send_sms", description = "SMS 발송", prompt = "고객에게 SMS 메시지를 발송해줘.", mappingId = "SMS_SEND_001")
|
@McpFunction(displayName = "send_sms 툴", name = "send_sms", description = "SMS 발송", prompt = "고객에게 SMS 메시지를 발송해줘.", mappingId = "SMS_SEND_001")
|
||||||
public Object sendSms(SmsSendReq req) {
|
public Object sendSms(SmsSendReq req) {
|
||||||
log.info("[SMS] SMS 발송 요청 수신. 수신자: {}", req.getPhoneNumber());
|
log.info("[SMS] SMS 발송 요청 수신. 수신자: {}", req.getPhoneNumber());
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ eims.mcistring.url=http://localhost:${server.port}/api/mock/esb/string
|
|||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user