Refactor: Move MCP tool annotations to interface level
This commit is contained in:
@@ -179,12 +179,35 @@ public class ToolScaffolder {
|
|||||||
String serviceInterfaceContent = """
|
String serviceInterfaceContent = """
|
||||||
package %s.usecase;
|
package %s.usecase;
|
||||||
|
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||||
import %s.dto.%sRequest;
|
import %s.dto.%sRequest;
|
||||||
|
|
||||||
|
@McpTool(
|
||||||
|
routingType = "%s",
|
||||||
|
categoryKey = "%s"
|
||||||
|
)
|
||||||
public interface %sUseCase {
|
public interface %sUseCase {
|
||||||
|
@McpFunction(
|
||||||
|
displayName = "%s 툴",
|
||||||
|
name = "%s",
|
||||||
|
description = "%s",
|
||||||
|
prompt = "%s",
|
||||||
|
mappingId = "%s",
|
||||||
|
register = %s,
|
||||||
|
requiresApproval = false,
|
||||||
|
openWorldHint = true
|
||||||
|
)
|
||||||
Object execute(%sRequest req);
|
Object execute(%sRequest req);
|
||||||
}
|
}
|
||||||
""".formatted(bizPackage, bizPackage, baseName, baseName, baseName);
|
""".formatted(
|
||||||
|
bizPackage,
|
||||||
|
bizPackage, baseName,
|
||||||
|
routingType, group.toLowerCase(),
|
||||||
|
baseName,
|
||||||
|
baseName, toolName, description, description + " 해줘.", interfaceId, register,
|
||||||
|
baseName
|
||||||
|
);
|
||||||
|
|
||||||
Files.writeString(usecaseDir.resolve(baseName + "UseCase.java"), serviceInterfaceContent);
|
Files.writeString(usecaseDir.resolve(baseName + "UseCase.java"), serviceInterfaceContent);
|
||||||
|
|
||||||
@@ -194,8 +217,6 @@ public class ToolScaffolder {
|
|||||||
serviceImplContent = """
|
serviceImplContent = """
|
||||||
package %s.usecase.impl;
|
package %s.usecase.impl;
|
||||||
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
|
||||||
import %s.dto.%sRequest;
|
import %s.dto.%sRequest;
|
||||||
import %s.dto.%sResponse;
|
import %s.dto.%sResponse;
|
||||||
import %s.usecase.%sUseCase;
|
import %s.usecase.%sUseCase;
|
||||||
@@ -225,26 +246,12 @@ public class ToolScaffolder {
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@McpTool(
|
|
||||||
routingType = "%s",
|
|
||||||
categoryKey = "%s"
|
|
||||||
)
|
|
||||||
public class %sUseCaseImpl implements %sUseCase {
|
public class %sUseCaseImpl implements %sUseCase {
|
||||||
|
|
||||||
private final AxhubMciComponent mci;
|
private final AxhubMciComponent mci;
|
||||||
private final %sLegacyConverter converter;
|
private final %sLegacyConverter converter;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@McpFunction(
|
|
||||||
displayName = "%s 툴",
|
|
||||||
name = "%s",
|
|
||||||
description = "%s",
|
|
||||||
prompt = "%s",
|
|
||||||
mappingId = "%s",
|
|
||||||
register = %s,
|
|
||||||
requiresApproval = false,
|
|
||||||
openWorldHint = true
|
|
||||||
)
|
|
||||||
public Object execute(%sRequest req) {
|
public Object execute(%sRequest req) {
|
||||||
log.info("[MCI Tool] {} 요청 수신.", "%s");
|
log.info("[MCI Tool] {} 요청 수신.", "%s");
|
||||||
try {
|
try {
|
||||||
@@ -269,18 +276,14 @@ public class ToolScaffolder {
|
|||||||
bizPackage, baseName,
|
bizPackage, baseName,
|
||||||
bizPackage, baseName,
|
bizPackage, baseName,
|
||||||
bizPackage, baseName,
|
bizPackage, baseName,
|
||||||
bizPackage, baseName,
|
|
||||||
BASE_PACKAGE, group.toLowerCase(), interfaceId,
|
BASE_PACKAGE, group.toLowerCase(), interfaceId,
|
||||||
bizPackage, baseName,
|
bizPackage, baseName,
|
||||||
author,
|
author,
|
||||||
createDate,
|
createDate,
|
||||||
createDate, author,
|
createDate, author,
|
||||||
routingType, group.toLowerCase(),
|
|
||||||
baseName, baseName,
|
baseName, baseName,
|
||||||
baseName,
|
baseName,
|
||||||
baseName, toolName, description, description + " 해줘.", interfaceId, register,
|
baseName, toolName,
|
||||||
baseName,
|
|
||||||
interfaceId,
|
|
||||||
interfaceId,
|
interfaceId,
|
||||||
interfaceId
|
interfaceId
|
||||||
);
|
);
|
||||||
@@ -288,8 +291,6 @@ public class ToolScaffolder {
|
|||||||
serviceImplContent = """
|
serviceImplContent = """
|
||||||
package %s.usecase.impl;
|
package %s.usecase.impl;
|
||||||
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
|
||||||
import %s.dto.%sRequest;
|
import %s.dto.%sRequest;
|
||||||
import %s.dto.%sResponse;
|
import %s.dto.%sResponse;
|
||||||
import %s.usecase.%sUseCase;
|
import %s.usecase.%sUseCase;
|
||||||
@@ -316,24 +317,11 @@ public class ToolScaffolder {
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@McpTool(
|
|
||||||
routingType = "%s",
|
|
||||||
categoryKey = "%s"
|
|
||||||
)
|
|
||||||
public class %sUseCaseImpl extends AbstractMcpToolUseCase implements %sUseCase {
|
public class %sUseCaseImpl extends AbstractMcpToolUseCase implements %sUseCase {
|
||||||
|
|
||||||
private final %sLegacyConverter converter;
|
private final %sLegacyConverter converter;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@McpFunction(
|
|
||||||
displayName = "%s 툴",
|
|
||||||
name = "%s",
|
|
||||||
description = "%s",
|
|
||||||
prompt = "%s",
|
|
||||||
mappingId = "%s",
|
|
||||||
register = %s,
|
|
||||||
requiresApproval = false
|
|
||||||
)
|
|
||||||
public Object execute(%sRequest req) {
|
public Object execute(%sRequest req) {
|
||||||
// %sLegacyRequest legacyRequest = converter.toLegacyRequest(req);
|
// %sLegacyRequest legacyRequest = converter.toLegacyRequest(req);
|
||||||
return executeLegacy("%s", "%s", req); // Or pass legacyRequest
|
return executeLegacy("%s", "%s", req); // Or pass legacyRequest
|
||||||
@@ -348,10 +336,8 @@ public class ToolScaffolder {
|
|||||||
author,
|
author,
|
||||||
createDate,
|
createDate,
|
||||||
createDate, author,
|
createDate, author,
|
||||||
routingType, group.toLowerCase(),
|
|
||||||
baseName, baseName,
|
baseName, baseName,
|
||||||
baseName,
|
baseName,
|
||||||
baseName, toolName, description, description + " 해줘.", interfaceId, register,
|
|
||||||
baseName,
|
baseName,
|
||||||
baseName,
|
baseName,
|
||||||
routingType, interfaceId
|
routingType, interfaceId
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import java.util.stream.Stream;
|
|||||||
public class ToolSourceUpdater {
|
public class ToolSourceUpdater {
|
||||||
|
|
||||||
public static void updateToolSource(String toolName, String domainGroup, String description, boolean register, Boolean requiresApproval) throws Exception {
|
public static void updateToolSource(String toolName, String domainGroup, String description, boolean register, Boolean requiresApproval) throws Exception {
|
||||||
// 1. Find all *Service.java files in axhub-tool-* directories
|
// 1. Find all *UseCase.java files in dap-tool-* directories
|
||||||
String envSourceDir = System.getenv("AXHUB_SOURCE_DIR");
|
String envSourceDir = System.getenv("AXHUB_SOURCE_DIR");
|
||||||
Path rootDir = envSourceDir != null ? Paths.get(envSourceDir) : Paths.get(".");
|
Path rootDir = envSourceDir != null ? Paths.get(envSourceDir) : Paths.get(".");
|
||||||
|
|
||||||
@@ -36,8 +36,8 @@ public class ToolSourceUpdater {
|
|||||||
try (Stream<Path> paths = Files.walk(rootDir)) {
|
try (Stream<Path> paths = Files.walk(rootDir)) {
|
||||||
javaFiles = paths
|
javaFiles = paths
|
||||||
.filter(Files::isRegularFile)
|
.filter(Files::isRegularFile)
|
||||||
.filter(p -> p.toString().endsWith("Service.java"))
|
.filter(p -> p.toString().endsWith("UseCase.java"))
|
||||||
.filter(p -> p.toString().contains("axhub-tool-"))
|
.filter(p -> p.toString().contains("dap-tool-") || p.toString().contains("axhub-tool-"))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -94,8 +94,8 @@ public class BusinessToolController {
|
|||||||
outerLoop:
|
outerLoop:
|
||||||
for (Object bean : allBeans.values()) {
|
for (Object bean : allBeans.values()) {
|
||||||
Class<?> targetClass = AopUtils.getTargetClass(bean);
|
Class<?> targetClass = AopUtils.getTargetClass(bean);
|
||||||
for (Method method : targetClass.getDeclaredMethods()) {
|
for (Method targetMethodOfClass : targetClass.getDeclaredMethods()) {
|
||||||
McpFunction mcpFunc = AnnotationUtils.findAnnotation(method, McpFunction.class);
|
McpFunction mcpFunc = AnnotationUtils.findAnnotation(targetMethodOfClass, McpFunction.class);
|
||||||
if (mcpFunc != null) {
|
if (mcpFunc != null) {
|
||||||
String baseName = mcpFunc.name();
|
String baseName = mcpFunc.name();
|
||||||
String expectedName = mcpProperties.getNamespace() != null && !mcpProperties.getNamespace().isEmpty()
|
String expectedName = mcpProperties.getNamespace() != null && !mcpProperties.getNamespace().isEmpty()
|
||||||
@@ -104,7 +104,11 @@ public class BusinessToolController {
|
|||||||
|
|
||||||
if (expectedName.equals(functionName) || baseName.equals(functionName)) {
|
if (expectedName.equals(functionName) || baseName.equals(functionName)) {
|
||||||
targetBean = bean;
|
targetBean = bean;
|
||||||
targetMethod = method;
|
try {
|
||||||
|
targetMethod = bean.getClass().getMethod(targetMethodOfClass.getName(), targetMethodOfClass.getParameterTypes());
|
||||||
|
} catch (NoSuchMethodException e) {
|
||||||
|
targetMethod = targetMethodOfClass;
|
||||||
|
}
|
||||||
targetFunctionAnnotation = mcpFunc;
|
targetFunctionAnnotation = mcpFunc;
|
||||||
break outerLoop;
|
break outerLoop;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,11 +76,18 @@ public class ToolRegistryHeartbeatSender {
|
|||||||
Map<String, Object> allBeans = applicationContext.getBeansOfType(Object.class);
|
Map<String, Object> allBeans = applicationContext.getBeansOfType(Object.class);
|
||||||
for (Object bean : allBeans.values()) {
|
for (Object bean : allBeans.values()) {
|
||||||
Class<?> targetClass = AopUtils.getTargetClass(bean);
|
Class<?> targetClass = AopUtils.getTargetClass(bean);
|
||||||
|
|
||||||
|
// 클래스 또는 프록시(인터페이스)에서 @McpTool 스캔
|
||||||
McpTool toolAnnotation = AnnotationUtils.findAnnotation(targetClass, McpTool.class);
|
McpTool toolAnnotation = AnnotationUtils.findAnnotation(targetClass, McpTool.class);
|
||||||
|
if (toolAnnotation == null) {
|
||||||
|
toolAnnotation = AnnotationUtils.findAnnotation(bean.getClass(), McpTool.class);
|
||||||
|
}
|
||||||
|
|
||||||
for (Method method : targetClass.getDeclaredMethods()) {
|
for (Method method : targetClass.getDeclaredMethods()) {
|
||||||
|
// 메서드, 수퍼클래스, 인터페이스를 모두 뒤져서 @McpFunction 스캔
|
||||||
McpFunction functionAnnotation = AnnotationUtils.findAnnotation(method, McpFunction.class);
|
McpFunction functionAnnotation = AnnotationUtils.findAnnotation(method, McpFunction.class);
|
||||||
if (functionAnnotation != null) {
|
|
||||||
|
if (functionAnnotation != null && toolAnnotation != null) {
|
||||||
String baseName = functionAnnotation.displayName();
|
String baseName = functionAnnotation.displayName();
|
||||||
String rawSubToolName = functionAnnotation.name();
|
String rawSubToolName = functionAnnotation.name();
|
||||||
String subToolName = mcpProperties.getNamespace() != null && !mcpProperties.getNamespace().isEmpty()
|
String subToolName = mcpProperties.getNamespace() != null && !mcpProperties.getNamespace().isEmpty()
|
||||||
|
|||||||
@@ -1,7 +1,15 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
||||||
|
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
||||||
|
|
||||||
|
@McpTool(routingType = "MCI", categoryKey = "cmm")
|
||||||
public interface BalanceUseCase {
|
public interface BalanceUseCase {
|
||||||
|
@McpFunction(register = false, displayName = "balance 툴", name = "balance",
|
||||||
|
description = "고객의 계좌 잔액을 조회합니다.",
|
||||||
|
prompt = "고객 계좌 잔액을 조회해줘.",
|
||||||
|
mappingId = "ACC_001"
|
||||||
|
)
|
||||||
Object execute(BalanceRequest req);
|
Object execute(BalanceRequest req);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,16 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
||||||
|
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
||||||
|
|
||||||
|
@McpTool(
|
||||||
|
routingType = "MCI",
|
||||||
|
categoryKey = "claim"
|
||||||
|
)
|
||||||
public interface BillingProcessUseCase {
|
public interface BillingProcessUseCase {
|
||||||
Object getStatus(BillingStatusRequest req);
|
Object getStatus(BillingStatusRequest req);
|
||||||
|
|
||||||
|
@McpFunction(register = false, displayName = "process 툴", name = "process", description = "청구 처리", prompt = "현재 접수된 청구건에 대한 심사 처리를 진행해.", mappingId = "BILL_002")
|
||||||
|
Object processBilling(BillingProcessRequest data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,16 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
||||||
|
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
||||||
|
|
||||||
|
@McpTool(
|
||||||
|
routingType = "EAI",
|
||||||
|
categoryKey = "policy"
|
||||||
|
)
|
||||||
public interface BondIssueUseCase {
|
public interface BondIssueUseCase {
|
||||||
Object check(BondCheckRequest req);
|
Object check(BondCheckRequest req);
|
||||||
|
|
||||||
|
@McpFunction(displayName = "issue 툴", name = "issue", register = false, description = "증권 발행 테스트1", prompt = "디지털 증권 발행 프로세스를 실행해.", mappingId = "BOND_002")
|
||||||
|
Object issue(BondIssueRequest data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,19 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
||||||
|
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
||||||
|
|
||||||
|
@McpTool(
|
||||||
|
routingType = "HTTP",
|
||||||
|
categoryKey = "hr"
|
||||||
|
)
|
||||||
public interface CommonUtilityUseCase {
|
public interface CommonUtilityUseCase {
|
||||||
Object registerVacation(VacationRegisterRequest req);
|
Object registerVacation(VacationRegisterRequest req);
|
||||||
|
|
||||||
|
@McpFunction(register = false, displayName = "get_leave_count 툴", name = "get_leave_count", description = "연차 갯수 조회", prompt = "현재 사용 가능한 남은 연차 일수를 알려줘.", mappingId = "HR_VAC_02")
|
||||||
|
Object getLeaveCount(LeaveCountRequest data);
|
||||||
|
|
||||||
|
@McpFunction(register = false, displayName = "secret_tool 툴", name = "secret_tool", description = "비공개 툴 테스트", prompt = "숨겨진 툴 강제 호출", mappingId = "SECRET_001", visible = false)
|
||||||
|
Object secretTool(LeaveCountRequest data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,16 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
||||||
|
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
||||||
|
|
||||||
|
@McpTool(
|
||||||
|
routingType = "HTTP",
|
||||||
|
categoryKey = "contract"
|
||||||
|
)
|
||||||
public interface ContractInquiryUseCase {
|
public interface ContractInquiryUseCase {
|
||||||
Object getStatus(ContractStatusRequest req);
|
Object getStatus(ContractStatusRequest req);
|
||||||
|
|
||||||
|
@McpFunction(register = false, displayName = "contract_detail 툴", name = "contract_detail", description = "계약상세 조회", prompt = "김신한 고객의 계약 상세 내역을 알려줘.", mappingId = "CNTR_002")
|
||||||
|
Object getDetail(ContractDetailRequest data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,16 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
||||||
|
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
||||||
|
|
||||||
|
@McpTool(
|
||||||
|
routingType = "TCP",
|
||||||
|
categoryKey = "customer"
|
||||||
|
)
|
||||||
public interface CustomerInfoUseCase {
|
public interface CustomerInfoUseCase {
|
||||||
Object getGrade(CustomerGradeRequest req);
|
Object getGrade(CustomerGradeRequest req);
|
||||||
|
|
||||||
|
@McpFunction(register = false, displayName = "detail 툴", name = "detail", description = "고객상세 정보 조회", prompt = "이 고객의 상세 기본정보(주소, 연락처 등)를 알려줘.", mappingId = "CRM_002")
|
||||||
|
Object getDetail(CustomerDetailRequest data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,19 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
package io.shinhanlife.dap.mcc.biz.cmm.usecase;
|
||||||
|
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.*;
|
||||||
|
|
||||||
|
@McpTool(
|
||||||
|
routingType = "HTTP",
|
||||||
|
categoryKey = "cmm"
|
||||||
|
)
|
||||||
public interface TemplateUtilityUseCase {
|
public interface TemplateUtilityUseCase {
|
||||||
|
@McpFunction(
|
||||||
|
displayName = "템플릿 유틸리티",
|
||||||
|
name = "get_template_file_url",
|
||||||
|
description = "요청한 템플릿(엑셀, 워드 등) 파일(양식)을 다운로드 받을 수 있는 시스템 URL을 반환합니다. AI는 이 URL을 사용자에게 마크다운 링크 형태로 제공해야 합니다.",
|
||||||
|
prompt = "요청하신 템플릿 양식 파일 다운로드 URL은 다음과 같습니다. 클릭하여 다운로드하세요:"
|
||||||
|
)
|
||||||
java.util.Map<String, Object> getTemplateFileUrl(TemplateDownloadRequest req);
|
java.util.Map<String, Object> getTemplateFileUrl(TemplateDownloadRequest req);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
|||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.BalanceUseCase;
|
import io.shinhanlife.dap.mcc.biz.cmm.usecase.BalanceUseCase;
|
||||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.BalanceRequest;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.BalanceRequest;
|
||||||
@@ -27,14 +25,9 @@ import java.util.Map;
|
|||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@McpTool(routingType = "MCI", categoryKey = "cmm")
|
|
||||||
public class BalanceUseCaseImpl extends AbstractMcpToolUseCase implements BalanceUseCase {
|
public class BalanceUseCaseImpl extends AbstractMcpToolUseCase implements BalanceUseCase {
|
||||||
|
|
||||||
@McpFunction(register = false, displayName = "balance 툴", name = "balance",
|
|
||||||
description = "고객의 계좌 잔액을 조회합니다.",
|
|
||||||
prompt = "고객 계좌 잔액을 조회해줘.",
|
|
||||||
mappingId = "ACC_001"
|
|
||||||
)
|
|
||||||
@Override
|
@Override
|
||||||
public Object execute(BalanceRequest req) {
|
public Object execute(BalanceRequest req) {
|
||||||
log.info("[Balance] 계좌 잔액 조회 요청 수신. 계좌번호: {}", req.getAccountNumber());
|
log.info("[Balance] 계좌 잔액 조회 요청 수신. 계좌번호: {}", req.getAccountNumber());
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.BillingProcessUseCase;
|
import io.shinhanlife.dap.mcc.biz.cmm.usecase.BillingProcessUseCase;
|
||||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.BillingProcessRequest;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.BillingProcessRequest;
|
||||||
@@ -12,10 +10,7 @@ import io.shinhanlife.dap.mcc.biz.cmm.dto.BillingStatusRequest;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@McpTool(
|
|
||||||
routingType = "MCI",
|
|
||||||
categoryKey = "claim"
|
|
||||||
)
|
|
||||||
/**
|
/**
|
||||||
* @package io.shinhanlife.dap.mcc.service
|
* @package io.shinhanlife.dap.mcc.service
|
||||||
* @className BillingProcessService
|
* @className BillingProcessService
|
||||||
@@ -33,13 +28,13 @@ import java.util.Map;
|
|||||||
@lombok.extern.slf4j.Slf4j
|
@lombok.extern.slf4j.Slf4j
|
||||||
public class BillingProcessUseCaseImpl extends AbstractMcpToolUseCase implements BillingProcessUseCase {
|
public class BillingProcessUseCaseImpl extends AbstractMcpToolUseCase implements BillingProcessUseCase {
|
||||||
|
|
||||||
@McpFunction(register = false, displayName = "status 툴", name = "status", description = "청구심사 상태 조회", prompt = "현재 접수된 청구건 상태를 알려줘.", mappingId = "BILL_001")
|
|
||||||
@Override
|
@Override
|
||||||
public Object getStatus(BillingStatusRequest data) {
|
public Object getStatus(BillingStatusRequest data) {
|
||||||
return executeBillingLogic("BILL_001", data);
|
return executeBillingLogic("BILL_001", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@McpFunction(register = false, displayName = "process 툴", name = "process", description = "청구 처리", prompt = "현재 접수된 청구건에 대한 심사 처리를 진행해.", mappingId = "BILL_002")
|
@Override
|
||||||
public Object processBilling(BillingProcessRequest data) {
|
public Object processBilling(BillingProcessRequest data) {
|
||||||
return executeBillingLogic("BILL_002", data);
|
return executeBillingLogic("BILL_002", data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,11 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
||||||
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.BondIssueUseCase;
|
import io.shinhanlife.dap.mcc.biz.cmm.usecase.BondIssueUseCase;
|
||||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.BondCheckRequest;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.BondCheckRequest;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.BondIssueRequest;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.BondIssueRequest;
|
||||||
|
|
||||||
@McpTool(
|
|
||||||
routingType = "EAI",
|
|
||||||
categoryKey = "policy"
|
|
||||||
)
|
|
||||||
/**
|
/**
|
||||||
* @package io.shinhanlife.dap.mcc.service
|
* @package io.shinhanlife.dap.mcc.service
|
||||||
* @className BondIssueService
|
* @className BondIssueService
|
||||||
@@ -27,13 +22,13 @@ import io.shinhanlife.dap.mcc.biz.cmm.dto.BondIssueRequest;
|
|||||||
*/
|
*/
|
||||||
public class BondIssueUseCaseImpl extends AbstractMcpToolUseCase implements BondIssueUseCase {
|
public class BondIssueUseCaseImpl extends AbstractMcpToolUseCase implements BondIssueUseCase {
|
||||||
|
|
||||||
@McpFunction(displayName = "check 툴", name = "check", register = false, description = "발행 가능 여부 조회 테스트", prompt = "디지털 증권 발행 한도가 충분한지 확인해줘.", mappingId = "BOND_001")
|
|
||||||
@Override
|
@Override
|
||||||
public Object check(BondCheckRequest data) {
|
public Object check(BondCheckRequest data) {
|
||||||
return executeLegacy("EAI", "BOND_001", data);
|
return executeLegacy("EAI", "BOND_001", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@McpFunction(displayName = "issue 툴", name = "issue", register = false, description = "증권 발행 테스트1", prompt = "디지털 증권 발행 프로세스를 실행해.", mappingId = "BOND_002")
|
@Override
|
||||||
public Object issue(BondIssueRequest data) {
|
public Object issue(BondIssueRequest data) {
|
||||||
return executeLegacy("EAI", "BOND_002", data);
|
return executeLegacy("EAI", "BOND_002", data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,11 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
||||||
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.CommonUtilityUseCase;
|
import io.shinhanlife.dap.mcc.biz.cmm.usecase.CommonUtilityUseCase;
|
||||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.LeaveCountRequest;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.LeaveCountRequest;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.VacationRegisterRequest;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.VacationRegisterRequest;
|
||||||
|
|
||||||
@McpTool(
|
|
||||||
routingType = "HTTP",
|
|
||||||
categoryKey = "hr"
|
|
||||||
)
|
|
||||||
/**
|
/**
|
||||||
* @package io.shinhanlife.dap.mcc.service
|
* @package io.shinhanlife.dap.mcc.service
|
||||||
* @className CommonUtilityService
|
* @className CommonUtilityService
|
||||||
@@ -27,18 +22,18 @@ import io.shinhanlife.dap.mcc.biz.cmm.dto.VacationRegisterRequest;
|
|||||||
*/
|
*/
|
||||||
public class CommonUtilityUseCaseImpl extends AbstractMcpToolUseCase implements CommonUtilityUseCase {
|
public class CommonUtilityUseCaseImpl extends AbstractMcpToolUseCase implements CommonUtilityUseCase {
|
||||||
|
|
||||||
@McpFunction(register = false, displayName = "register_vacation 툴", name = "register_vacation", description = "휴가 등록", prompt = "내일 하루 연차 휴가를 등록해줘.", mappingId = "HR_VAC_01")
|
|
||||||
@Override
|
@Override
|
||||||
public Object registerVacation(VacationRegisterRequest data) {
|
public Object registerVacation(VacationRegisterRequest data) {
|
||||||
return executeLegacy("HTTP", "HR_VAC_01", data);
|
return executeLegacy("HTTP", "HR_VAC_01", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@McpFunction(register = false, displayName = "get_leave_count 툴", name = "get_leave_count", description = "연차 갯수 조회", prompt = "현재 사용 가능한 남은 연차 일수를 알려줘.", mappingId = "HR_VAC_02")
|
@Override
|
||||||
public Object getLeaveCount(LeaveCountRequest data) {
|
public Object getLeaveCount(LeaveCountRequest data) {
|
||||||
return executeLegacy("HTTP", "HR_VAC_02", data);
|
return executeLegacy("HTTP", "HR_VAC_02", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@McpFunction(register = false, displayName = "secret_tool 툴", name = "secret_tool", description = "비공개 툴 테스트", prompt = "숨겨진 툴 강제 호출", mappingId = "SECRET_001", visible = false)
|
@Override
|
||||||
public Object secretTool(LeaveCountRequest data) {
|
public Object secretTool(LeaveCountRequest data) {
|
||||||
return executeLegacy("HTTP", "SECRET_001", data);
|
return executeLegacy("HTTP", "SECRET_001", data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,11 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
||||||
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.ContractInquiryUseCase;
|
import io.shinhanlife.dap.mcc.biz.cmm.usecase.ContractInquiryUseCase;
|
||||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.ContractDetailRequest;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.ContractDetailRequest;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.ContractStatusRequest;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.ContractStatusRequest;
|
||||||
|
|
||||||
@McpTool(
|
|
||||||
routingType = "HTTP",
|
|
||||||
categoryKey = "contract"
|
|
||||||
)
|
|
||||||
/**
|
/**
|
||||||
* @package io.shinhanlife.dap.mcc.service
|
* @package io.shinhanlife.dap.mcc.service
|
||||||
* @className ContractInquiryService
|
* @className ContractInquiryService
|
||||||
@@ -27,13 +22,13 @@ import io.shinhanlife.dap.mcc.biz.cmm.dto.ContractStatusRequest;
|
|||||||
*/
|
*/
|
||||||
public class ContractInquiryUseCaseImpl extends AbstractMcpToolUseCase implements ContractInquiryUseCase {
|
public class ContractInquiryUseCaseImpl extends AbstractMcpToolUseCase implements ContractInquiryUseCase {
|
||||||
|
|
||||||
@McpFunction(register = false, displayName = "contract_status 툴", name = "contract_status", description = "계약상태 조회", prompt = "김신한 고객의 현재 계약 상태를 조회해줘.", mappingId = "CNTR_001")
|
|
||||||
@Override
|
@Override
|
||||||
public Object getStatus(ContractStatusRequest data) {
|
public Object getStatus(ContractStatusRequest data) {
|
||||||
return executeLegacy("HTTP", "CNTR_001", data);
|
return executeLegacy("HTTP", "CNTR_001", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@McpFunction(register = false, displayName = "contract_detail 툴", name = "contract_detail", description = "계약상세 조회", prompt = "김신한 고객의 계약 상세 내역을 알려줘.", mappingId = "CNTR_002")
|
@Override
|
||||||
public Object getDetail(ContractDetailRequest data) {
|
public Object getDetail(ContractDetailRequest data) {
|
||||||
return executeLegacy("HTTP", "CNTR_002", data);
|
return executeLegacy("HTTP", "CNTR_002", data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,11 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
||||||
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.CustomerInfoUseCase;
|
import io.shinhanlife.dap.mcc.biz.cmm.usecase.CustomerInfoUseCase;
|
||||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.CustomerDetailRequest;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.CustomerDetailRequest;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.CustomerGradeRequest;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.CustomerGradeRequest;
|
||||||
|
|
||||||
@McpTool(
|
|
||||||
routingType = "TCP",
|
|
||||||
categoryKey = "customer"
|
|
||||||
)
|
|
||||||
/**
|
/**
|
||||||
* @package io.shinhanlife.dap.mcc.service
|
* @package io.shinhanlife.dap.mcc.service
|
||||||
* @className CustomerInfoService
|
* @className CustomerInfoService
|
||||||
@@ -27,13 +22,13 @@ import io.shinhanlife.dap.mcc.biz.cmm.dto.CustomerGradeRequest;
|
|||||||
*/
|
*/
|
||||||
public class CustomerInfoUseCaseImpl extends AbstractMcpToolUseCase implements CustomerInfoUseCase {
|
public class CustomerInfoUseCaseImpl extends AbstractMcpToolUseCase implements CustomerInfoUseCase {
|
||||||
|
|
||||||
@McpFunction(register = false, displayName = "grade 툴", name = "grade", description = "고객등급 조회", prompt = "이 고객의 VIP 등급을 조회해줘.", mappingId = "CRM_001")
|
|
||||||
@Override
|
@Override
|
||||||
public Object getGrade(CustomerGradeRequest req) {
|
public Object getGrade(CustomerGradeRequest req) {
|
||||||
return executeLegacy("TCP", "CRM_001", req);
|
return executeLegacy("TCP", "CRM_001", req);
|
||||||
}
|
}
|
||||||
|
|
||||||
@McpFunction(register = false, displayName = "detail 툴", name = "detail", description = "고객상세 정보 조회", prompt = "이 고객의 상세 기본정보(주소, 연락처 등)를 알려줘.", mappingId = "CRM_002")
|
@Override
|
||||||
public Object getDetail(CustomerDetailRequest data) {
|
public Object getDetail(CustomerDetailRequest data) {
|
||||||
return executeLegacy("TCP", "CRM_002", data);
|
return executeLegacy("TCP", "CRM_002", data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
package io.shinhanlife.dap.mcc.biz.cmm.usecase.impl;
|
||||||
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.usecase.TemplateUtilityUseCase;
|
import io.shinhanlife.dap.mcc.biz.cmm.usecase.TemplateUtilityUseCase;
|
||||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||||
import io.shinhanlife.dap.mcc.biz.cmm.dto.TemplateDownloadRequest;
|
import io.shinhanlife.dap.mcc.biz.cmm.dto.TemplateDownloadRequest;
|
||||||
@@ -14,10 +12,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@McpTool(
|
|
||||||
routingType = "HTTP",
|
|
||||||
categoryKey = "cmm"
|
|
||||||
)
|
|
||||||
/**
|
/**
|
||||||
* @package io.shinhanlife.dap.mcc.service
|
* @package io.shinhanlife.dap.mcc.service
|
||||||
* @className TemplateUtilityService
|
* @className TemplateUtilityService
|
||||||
@@ -35,10 +30,6 @@ import java.util.Map;
|
|||||||
public class TemplateUtilityUseCaseImpl extends AbstractMcpToolUseCase implements TemplateUtilityUseCase {
|
public class TemplateUtilityUseCaseImpl extends AbstractMcpToolUseCase implements TemplateUtilityUseCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@McpFunction(register = false, displayName = "get_template_file_url 툴", name = "get_template_file_url",
|
|
||||||
description = "특정 템플릿의 양식 파일(엑셀, 워드 등)을 다운로드 받을 수 있는 시스템 URL을 반환합니다. AI는 이 URL을 사용자에게 마크다운 링크 형태로 제공해야 합니다.",
|
|
||||||
prompt = "요청하신 템플릿 양식 파일 다운로드 URL은 다음과 같습니다. 클릭하여 다운로드하세요:"
|
|
||||||
)
|
|
||||||
public Map<String, Object> getTemplateFileUrl(TemplateDownloadRequest data) {
|
public Map<String, Object> getTemplateFileUrl(TemplateDownloadRequest data) {
|
||||||
try {
|
try {
|
||||||
String templateId = (data != null && data.getTemplateId() != null) ? data.getTemplateId().toLowerCase() : "default";
|
String templateId = (data != null && data.getTemplateId() != null) ? data.getTemplateId().toLowerCase() : "default";
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.oth.usecase;
|
package io.shinhanlife.dap.mcc.biz.oth.usecase;
|
||||||
|
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||||
import io.shinhanlife.dap.mcc.biz.oth.dto.*;
|
import io.shinhanlife.dap.mcc.biz.oth.dto.*;
|
||||||
|
|
||||||
|
@McpTool(routingType = "MCI", categoryKey = "oth")
|
||||||
public interface OnnbaMciToolUseCase {
|
public interface OnnbaMciToolUseCase {
|
||||||
Object callOnnba3011(Onnba3011Request req);
|
Object callOnnba3011(Onnba3011Request req);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.oth.usecase.impl;
|
package io.shinhanlife.dap.mcc.biz.oth.usecase.impl;
|
||||||
|
|
||||||
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.MciCfpaClient;
|
import io.shinhanlife.dap.mcc.infra.itrf.mci.cfp.a.MciCfpaClient;
|
||||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
|
||||||
import io.shinhanlife.dap.mcc.biz.oth.usecase.OnnbaMciToolUseCase;
|
import io.shinhanlife.dap.mcc.biz.oth.usecase.OnnbaMciToolUseCase;
|
||||||
import io.shinhanlife.dap.mcc.biz.oth.dto.Onnba3011Request;
|
import io.shinhanlife.dap.mcc.biz.oth.dto.Onnba3011Request;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -26,7 +24,6 @@ import org.springframework.stereotype.Service;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@McpTool(routingType = "MCI", categoryKey = "oth")
|
|
||||||
public class OnnbaMciToolUseCaseImpl implements OnnbaMciToolUseCase {
|
public class OnnbaMciToolUseCaseImpl implements OnnbaMciToolUseCase {
|
||||||
|
|
||||||
private static final String INTERFACE_CODE_3011 = "CLCNNB00001";
|
private static final String INTERFACE_CODE_3011 = "CLCNNB00001";
|
||||||
@@ -38,14 +35,7 @@ public class OnnbaMciToolUseCaseImpl implements OnnbaMciToolUseCase {
|
|||||||
* AI Agent가 호출하게 될 메서드입니다.
|
* AI Agent가 호출하게 될 메서드입니다.
|
||||||
* @McpFunction 어노테이션 하나로 AI 도구로 자동 노출 및 라우팅됩니다.
|
* @McpFunction 어노테이션 하나로 AI 도구로 자동 노출 및 라우팅됩니다.
|
||||||
*/
|
*/
|
||||||
@McpFunction(
|
|
||||||
register = false,
|
|
||||||
name = "calculate_subscription_limit",
|
|
||||||
displayName = "보종By가입설계한도계산조회",
|
|
||||||
description = "MCI 연동을 통해 보종By가입설계한도계산조회를 수행합니다.",
|
|
||||||
prompt = "가입설계 한도를 계산하고 조회해줘.",
|
|
||||||
mappingId = INTERFACE_CODE_3011
|
|
||||||
)
|
|
||||||
@Override
|
@Override
|
||||||
public Object callOnnba3011(Onnba3011Request req) {
|
public Object callOnnba3011(Onnba3011Request req) {
|
||||||
log.info("[MCI Tool] 보종By가입설계한도계산조회 요청 수신.");
|
log.info("[MCI Tool] 보종By가입설계한도계산조회 요청 수신.");
|
||||||
|
|||||||
@@ -1,8 +1,19 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.smp.usecase;
|
package io.shinhanlife.dap.mcc.biz.smp.usecase;
|
||||||
|
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||||
import io.shinhanlife.dap.mcc.biz.smp.dto.DailyQuoteRequest;
|
import io.shinhanlife.dap.mcc.biz.smp.dto.DailyQuoteRequest;
|
||||||
import io.shinhanlife.dap.mcc.biz.smp.dto.DailyQuoteResponse;
|
import io.shinhanlife.dap.mcc.biz.smp.dto.DailyQuoteResponse;
|
||||||
|
|
||||||
|
@McpTool(
|
||||||
|
routingType = "DIRECT",
|
||||||
|
categoryKey = "smp"
|
||||||
|
)
|
||||||
public interface DailyQuoteToolUseCase {
|
public interface DailyQuoteToolUseCase {
|
||||||
|
@McpFunction(register = false, displayName = "랜덤 명언 툴", name = "daily_quote",
|
||||||
|
description = "무작위로 영감을 주는 명언을 하나 가져옵니다.",
|
||||||
|
prompt = "오늘의 명언 하나 알려줘, 동기부여 명언 등",
|
||||||
|
mappingId = "QUOTE_001"
|
||||||
|
)
|
||||||
DailyQuoteResponse execute(DailyQuoteRequest req);
|
DailyQuoteResponse execute(DailyQuoteRequest req);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,21 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.smp.usecase;
|
package io.shinhanlife.dap.mcc.biz.smp.usecase;
|
||||||
|
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||||
|
import io.shinhanlife.dap.mcc.biz.smp.dto.ExchangeRateRequest;
|
||||||
|
import io.shinhanlife.dap.mcc.biz.smp.dto.ExchangeRateResponse;
|
||||||
import io.shinhanlife.dap.mcc.biz.smp.dto.ExchangeRateRequest;
|
import io.shinhanlife.dap.mcc.biz.smp.dto.ExchangeRateRequest;
|
||||||
import io.shinhanlife.dap.mcc.biz.smp.dto.ExchangeRateResponse;
|
import io.shinhanlife.dap.mcc.biz.smp.dto.ExchangeRateResponse;
|
||||||
|
|
||||||
|
@McpTool(
|
||||||
|
routingType = "DIRECT",
|
||||||
|
categoryKey = "smp"
|
||||||
|
)
|
||||||
public interface ExchangeRateToolUseCase {
|
public interface ExchangeRateToolUseCase {
|
||||||
|
@McpFunction(register = false, displayName = "실시간 환율 조회 툴", name = "exchange_rate",
|
||||||
|
description = "원하는 통화의 실시간 환율을 조회합니다. (예: USD, EUR, JPY)",
|
||||||
|
prompt = "현재 달러 환율 알려줘, 엔화 환율은?",
|
||||||
|
mappingId = "EXCHANGE_001"
|
||||||
|
)
|
||||||
ExchangeRateResponse execute(ExchangeRateRequest req);
|
ExchangeRateResponse execute(ExchangeRateRequest req);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,18 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.smp.usecase;
|
package io.shinhanlife.dap.mcc.biz.smp.usecase;
|
||||||
|
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||||
import io.shinhanlife.dap.mcc.biz.smp.dto.*;
|
import io.shinhanlife.dap.mcc.biz.smp.dto.*;
|
||||||
|
|
||||||
|
@McpTool(
|
||||||
|
routingType = "DIRECT",
|
||||||
|
categoryKey = "smp"
|
||||||
|
)
|
||||||
public interface WeatherToolUseCase {
|
public interface WeatherToolUseCase {
|
||||||
|
@McpFunction(register = false, displayName = "날씨 조회 툴", name = "weather",
|
||||||
|
description = "특정 도시의 현재 날씨, 온도, 풍속 정보를 조회합니다.",
|
||||||
|
prompt = "서울 날씨 알려줘, 부산 기온 알려줘 등 실시간 기상 조회",
|
||||||
|
mappingId = "WEATHER_001"
|
||||||
|
)
|
||||||
WeatherResponse execute(WeatherRequest req);
|
WeatherResponse execute(WeatherRequest req);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.smp.usecase.impl;
|
package io.shinhanlife.dap.mcc.biz.smp.usecase.impl;
|
||||||
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
|
||||||
import io.shinhanlife.dap.mcc.biz.smp.dto.DailyQuoteRequest;
|
import io.shinhanlife.dap.mcc.biz.smp.dto.DailyQuoteRequest;
|
||||||
import io.shinhanlife.dap.mcc.biz.smp.dto.DailyQuoteResponse;
|
import io.shinhanlife.dap.mcc.biz.smp.dto.DailyQuoteResponse;
|
||||||
import io.shinhanlife.dap.mcc.biz.smp.usecase.DailyQuoteToolUseCase;
|
import io.shinhanlife.dap.mcc.biz.smp.usecase.DailyQuoteToolUseCase;
|
||||||
@@ -28,10 +26,6 @@ import java.util.Random;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@McpTool(
|
|
||||||
routingType = "DIRECT",
|
|
||||||
categoryKey = "smp"
|
|
||||||
)
|
|
||||||
public class DailyQuoteToolUseCaseImpl extends AbstractMcpToolUseCase implements DailyQuoteToolUseCase {
|
public class DailyQuoteToolUseCaseImpl extends AbstractMcpToolUseCase implements DailyQuoteToolUseCase {
|
||||||
|
|
||||||
private final List<DailyQuoteResponse> quotes = List.of(
|
private final List<DailyQuoteResponse> quotes = List.of(
|
||||||
@@ -42,11 +36,6 @@ public class DailyQuoteToolUseCaseImpl extends AbstractMcpToolUseCase implements
|
|||||||
);
|
);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@McpFunction(register = false, displayName = "랜덤 명언 툴", name = "daily_quote",
|
|
||||||
description = "무작위로 영감을 주는 명언을 하나 가져옵니다.",
|
|
||||||
prompt = "오늘의 명언 하나 알려줘, 동기부여 명언 등",
|
|
||||||
mappingId = "QUOTE_001"
|
|
||||||
)
|
|
||||||
public DailyQuoteResponse execute(DailyQuoteRequest req) {
|
public DailyQuoteResponse execute(DailyQuoteRequest req) {
|
||||||
int index = new Random().nextInt(quotes.size());
|
int index = new Random().nextInt(quotes.size());
|
||||||
DailyQuoteResponse selected = quotes.get(index);
|
DailyQuoteResponse selected = quotes.get(index);
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.smp.usecase.impl;
|
package io.shinhanlife.dap.mcc.biz.smp.usecase.impl;
|
||||||
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
|
||||||
import io.shinhanlife.dap.mcc.biz.smp.dto.ExchangeRateRequest;
|
import io.shinhanlife.dap.mcc.biz.smp.dto.ExchangeRateRequest;
|
||||||
import io.shinhanlife.dap.mcc.biz.smp.dto.ExchangeRateResponse;
|
import io.shinhanlife.dap.mcc.biz.smp.dto.ExchangeRateResponse;
|
||||||
import io.shinhanlife.dap.mcc.biz.smp.usecase.ExchangeRateToolUseCase;
|
import io.shinhanlife.dap.mcc.biz.smp.usecase.ExchangeRateToolUseCase;
|
||||||
@@ -26,10 +24,6 @@ import org.springframework.web.client.RestClient;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@McpTool(
|
|
||||||
routingType = "DIRECT",
|
|
||||||
categoryKey = "smp"
|
|
||||||
)
|
|
||||||
public class ExchangeRateToolUseCaseImpl extends AbstractMcpToolUseCase implements ExchangeRateToolUseCase {
|
public class ExchangeRateToolUseCaseImpl extends AbstractMcpToolUseCase implements ExchangeRateToolUseCase {
|
||||||
|
|
||||||
private final RestClient restClient;
|
private final RestClient restClient;
|
||||||
@@ -39,11 +33,6 @@ public class ExchangeRateToolUseCaseImpl extends AbstractMcpToolUseCase implemen
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@McpFunction(register = false, displayName = "실시간 환율 조회 툴", name = "exchange_rate",
|
|
||||||
description = "원하는 통화의 실시간 환율을 조회합니다. (예: USD, EUR, JPY)",
|
|
||||||
prompt = "현재 달러 환율 알려줘, 엔화 환율은?",
|
|
||||||
mappingId = "EXCHANGE_001"
|
|
||||||
)
|
|
||||||
public ExchangeRateResponse execute(ExchangeRateRequest req) {
|
public ExchangeRateResponse execute(ExchangeRateRequest req) {
|
||||||
String targetCurrency = req.currencyCode() != null ? req.currencyCode().toUpperCase().trim() : "USD";
|
String targetCurrency = req.currencyCode() != null ? req.currencyCode().toUpperCase().trim() : "USD";
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ package io.shinhanlife.dap.mcc.biz.smp.usecase.impl;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
|
||||||
import io.shinhanlife.dap.mcc.biz.smp.usecase.WeatherToolUseCase;
|
import io.shinhanlife.dap.mcc.biz.smp.usecase.WeatherToolUseCase;
|
||||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||||
import io.shinhanlife.dap.mcc.biz.smp.dto.WeatherRequest;
|
import io.shinhanlife.dap.mcc.biz.smp.dto.WeatherRequest;
|
||||||
@@ -31,10 +29,6 @@ import java.time.format.DateTimeFormatter;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@McpTool(
|
|
||||||
routingType = "DIRECT",
|
|
||||||
categoryKey = "smp"
|
|
||||||
)
|
|
||||||
public class WeatherToolUseCaseImpl extends AbstractMcpToolUseCase implements WeatherToolUseCase {
|
public class WeatherToolUseCaseImpl extends AbstractMcpToolUseCase implements WeatherToolUseCase {
|
||||||
|
|
||||||
private final RestClient restClient;
|
private final RestClient restClient;
|
||||||
@@ -42,12 +36,6 @@ public class WeatherToolUseCaseImpl extends AbstractMcpToolUseCase implements We
|
|||||||
public WeatherToolUseCaseImpl() {
|
public WeatherToolUseCaseImpl() {
|
||||||
this.restClient = RestClient.create();
|
this.restClient = RestClient.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@McpFunction(register = false, displayName = "날씨 조회 툴", name = "weather",
|
|
||||||
description = "특정 도시의 현재 날씨, 온도, 풍속 정보를 조회합니다.",
|
|
||||||
prompt = "서울 날씨 알려줘, 부산 기온 알려줘 등 실시간 기상 조회",
|
|
||||||
mappingId = "WEATHER_001"
|
|
||||||
)
|
|
||||||
public WeatherResponse execute(WeatherRequest req) {
|
public WeatherResponse execute(WeatherRequest req) {
|
||||||
String city = req.city() != null ? req.city().trim() : "서울";
|
String city = req.city() != null ? req.city().trim() : "서울";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.sms.usecase;
|
package io.shinhanlife.dap.mcc.biz.sms.usecase;
|
||||||
|
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||||
|
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||||
import io.shinhanlife.dap.mcc.biz.sms.dto.*;
|
import io.shinhanlife.dap.mcc.biz.sms.dto.*;
|
||||||
|
|
||||||
|
@McpTool(routingType = "EAI", categoryKey = "notification")
|
||||||
public interface SmsToolUseCase {
|
public interface SmsToolUseCase {
|
||||||
Object sendSms(SmsSendRequest req);
|
Object sendSms(SmsSendRequest req);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package io.shinhanlife.dap.mcc.biz.sms.usecase.impl;
|
package io.shinhanlife.dap.mcc.biz.sms.usecase.impl;
|
||||||
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
|
||||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
|
||||||
import io.shinhanlife.dap.mcc.biz.sms.usecase.SmsToolUseCase;
|
import io.shinhanlife.dap.mcc.biz.sms.usecase.SmsToolUseCase;
|
||||||
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
import io.shinhanlife.dap.mcc.usecase.AbstractMcpToolUseCase;
|
||||||
import io.shinhanlife.dap.mcc.biz.sms.converter.SmsLegacyConverter;
|
import io.shinhanlife.dap.mcc.biz.sms.converter.SmsLegacyConverter;
|
||||||
@@ -28,12 +26,11 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@McpTool(routingType = "EAI", categoryKey = "notification")
|
|
||||||
public class SmsToolUseCaseImpl extends AbstractMcpToolUseCase implements SmsToolUseCase {
|
public class SmsToolUseCaseImpl extends AbstractMcpToolUseCase implements SmsToolUseCase {
|
||||||
|
|
||||||
private final SmsLegacyConverter converter;
|
private final SmsLegacyConverter converter;
|
||||||
|
|
||||||
@McpFunction(register = false, displayName = "send_sms 툴", name = "send_sms", description = "SMS 발송", prompt = "고객에게 SMS 메시지를 발송해줘.", mappingId = "SMS_SEND_001")
|
|
||||||
@Override
|
@Override
|
||||||
public Object sendSms(SmsSendRequest req) {
|
public Object sendSms(SmsSendRequest req) {
|
||||||
log.info("[SMS] SMS 발송 요청 수신. 수신자: {}", req.getPhoneNumber());
|
log.info("[SMS] SMS 발송 요청 수신. 수신자: {}", req.getPhoneNumber());
|
||||||
|
|||||||
Reference in New Issue
Block a user