feat: enhance tool scaffold and usecase naming
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 0s
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 0s
This commit is contained in:
@@ -26,5 +26,5 @@ public interface CustomerGuidanceToolUseCase {
|
||||
|
||||
@McpTool(name = "cmm_customer_tool", title = "고객 통합 안내이력 조회", description = "고객의 통합 안내 이력을 조회하는 도구입니다. 고객 ID와 조회 기간을 입력하면 해당 기간 동안의 안내 이력을 반환합니다.")
|
||||
@ToolHint(register = false, categoryKey = "cmm", mappingId = "ONILD0320")
|
||||
CustomerGuidanceToolResponse execute(CustomerGuidanceToolRequest req) throws Exception;
|
||||
CustomerGuidanceToolResponse searchCustomerGuidance(CustomerGuidanceToolRequest req) throws Exception;
|
||||
}
|
||||
|
||||
@@ -22,5 +22,5 @@ import io.shinhanlife.dap.mcc.biz.cmm.dto.MetaCommonCodeRequest;
|
||||
public interface MetaCommonCodeUseCase {
|
||||
@McpTool(name = "cmm_comcode_lookup", title = "메타 공통코드 조회 툴", description = "메타 통합코드 목록을 조회해줘", annotations = @McpTool.McpAnnotations(openWorldHint = true))
|
||||
@ToolHint(register = false, requiresApproval = false, categoryKey = "cmm", mappingId = "CLCNNB00001")
|
||||
Object execute(MetaCommonCodeRequest req);
|
||||
Object searchCommonCode(MetaCommonCodeRequest req);
|
||||
}
|
||||
|
||||
@@ -22,5 +22,5 @@ import io.shinhanlife.dap.mcc.biz.cmm.dto.MetaTableRequest;
|
||||
public interface MetaTableUseCase {
|
||||
@McpTool(name = "cmm_meta_table", title = "메타 테이블 조회 툴", description = "메타 테이블 정보 목록을 조회해줘", annotations = @McpTool.McpAnnotations(openWorldHint = true))
|
||||
@ToolHint(register = false, requiresApproval = false, categoryKey = "cmm", mappingId = "CLCNNB00001")
|
||||
Object execute(MetaTableRequest req);
|
||||
Object searchMetaTable(MetaTableRequest req);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class CustomerGuidanceToolUseCaseImpl implements CustomerGuidanceToolUseC
|
||||
private final CustomerGuidanceToolConverter converter;
|
||||
|
||||
@Override
|
||||
public CustomerGuidanceToolResponse execute(CustomerGuidanceToolRequest req) throws Exception {
|
||||
public CustomerGuidanceToolResponse searchCustomerGuidance(CustomerGuidanceToolRequest req) throws Exception {
|
||||
ONILD0320_I onild0320_i = converter.toONILD0320_I(req);
|
||||
ONILD0320_O onild0320_o = mci.callOnild0320(onild0320_i);
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class MetaCommonCodeUseCaseImpl implements MetaCommonCodeUseCase {
|
||||
private final MetaCommonCodeConverter converter;
|
||||
|
||||
@Override
|
||||
public Object execute(MetaCommonCodeRequest req) {
|
||||
public Object searchCommonCode(MetaCommonCodeRequest req) {
|
||||
log.info("[MCI Tool] {} 요청 수신. 파라미터: {}", "metaCommonCode", req);
|
||||
try {
|
||||
CLCNNB00001_I mciRequest = converter.toLegacyRequest(req);
|
||||
|
||||
@@ -38,7 +38,7 @@ public class MetaTableUseCaseImpl implements MetaTableUseCase {
|
||||
private final MetaTableConverter converter;
|
||||
|
||||
@Override
|
||||
public Object execute(MetaTableRequest req) {
|
||||
public Object searchMetaTable(MetaTableRequest req) {
|
||||
log.info("[MCI Tool] {} 요청 수신. 파라미터: {}", "metaTable", req);
|
||||
try {
|
||||
CLCNNB00001_I mciRequest = converter.toLegacyRequest(req);
|
||||
|
||||
@@ -23,5 +23,5 @@ public interface InsuranceClaimProcessorUseCase {
|
||||
|
||||
@McpTool(name = "ins_insurance_processor", title = "보험금 청구", description = "보험금 청구 요청을 처리하고 결과를 반환하는 LLM 도구 가이드")
|
||||
@ToolHint(register = false, categoryKey = "ins", mappingId = "CLAIM0000001")
|
||||
InsuranceClaimProcessorResponse execute(InsuranceClaimProcessorRequest req);
|
||||
InsuranceClaimProcessorResponse processInsuranceClaim(InsuranceClaimProcessorRequest req);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public class InsuranceClaimProcessorUseCaseImpl implements InsuranceClaimProcess
|
||||
private final InsuranceClient insuranceClient;
|
||||
|
||||
@Override
|
||||
public InsuranceClaimProcessorResponse execute(InsuranceClaimProcessorRequest req) {
|
||||
public InsuranceClaimProcessorResponse processInsuranceClaim(InsuranceClaimProcessorRequest req) {
|
||||
InsuranceClaimProcessorHttpRequest httpRequest = converter.toHttpRequest(req);
|
||||
InsuranceClaimProcessorHttpResponse httpResponse = insuranceClient.call(httpRequest, InsuranceClaimProcessorHttpResponse.class);
|
||||
|
||||
|
||||
@@ -7,5 +7,5 @@ import io.shinhanlife.dap.mcc.biz.oth.dto.*;
|
||||
public interface Onnba3011UseCase {
|
||||
@McpTool(name = "oth_onnba3011_call", description = "Onnba3011 호출 툴")
|
||||
@ToolHint(categoryKey = "oth", register = false)
|
||||
Object execute(Onnba3011Request req);
|
||||
Object callOnnba3011(Onnba3011Request req);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class Onnba3011UseCaseImpl implements Onnba3011UseCase {
|
||||
* AI Agent가 호출하게 될 메서드입니다.
|
||||
*/
|
||||
@Override
|
||||
public Object execute(Onnba3011Request req) {
|
||||
public Object callOnnba3011(Onnba3011Request req) {
|
||||
log.info("[MCI Tool] 보종By가입설계한도계산조회 요청 수신.");
|
||||
|
||||
try {
|
||||
|
||||
@@ -9,5 +9,5 @@ import io.shinhanlife.dap.mcc.biz.smp.dto.DailyQuoteResponse;
|
||||
public interface DailyQuoteToolUseCase {
|
||||
@McpTool(name = "smp_quote_daily", title = "오늘의 명언 툴", description = "무작위로 영감을 주는 명언을 하나 가져옵니다.")
|
||||
@ToolHint(register = false, categoryKey = "smp", mappingId = "QUOTE_001")
|
||||
DailyQuoteResponse execute(DailyQuoteRequest req);
|
||||
DailyQuoteResponse getDailyQuote(DailyQuoteRequest req);
|
||||
}
|
||||
|
||||
@@ -11,5 +11,5 @@ import io.shinhanlife.dap.mcc.biz.smp.dto.ExchangeRateResponse;
|
||||
public interface ExchangeRateToolUseCase {
|
||||
@McpTool(name = "smp_exchange_inquiry", title = "실시간 환율 조회 툴", description = "원하는 통화의 실시간 환율을 조회합니다. (예: USD, EUR, JPY)")
|
||||
@ToolHint(register = false, categoryKey = "smp", mappingId = "EXCHANGE_001")
|
||||
ExchangeRateResponse execute(ExchangeRateRequest req);
|
||||
ExchangeRateResponse getExchangeRate(ExchangeRateRequest req);
|
||||
}
|
||||
|
||||
@@ -8,5 +8,5 @@ import io.shinhanlife.dap.mcc.biz.smp.dto.TeamMemberRequest;
|
||||
public interface TeamMemberUseCase {
|
||||
@McpTool(name = "smp_team_list", title = "신한라이프 MCP, TOOL 파트 구성원 조회", description = "신한라이프 MCP, TOOL 파트 구성원을 조회합니다.", annotations = @McpTool.McpAnnotations(openWorldHint = true))
|
||||
@ToolHint(register = false, requiresApproval = false, categoryKey = "smp", mappingId = "DIRECT0001")
|
||||
Object execute(TeamMemberRequest req);
|
||||
Object getTeamMember(TeamMemberRequest req);
|
||||
}
|
||||
|
||||
@@ -8,5 +8,5 @@ import io.shinhanlife.dap.mcc.biz.smp.dto.*;
|
||||
public interface WeatherToolUseCase {
|
||||
@McpTool(name = "smp_weather_inquiry", title = "날씨 조회 툴", description = "특정 도시의 현재 날씨, 온도, 풍속 정보를 조회합니다.")
|
||||
@ToolHint(register = false, categoryKey = "smp", mappingId = "WEATHER_001")
|
||||
WeatherResponse execute(WeatherRequest req);
|
||||
WeatherResponse getWeather(WeatherRequest req);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class DailyQuoteToolUseCaseImpl implements DailyQuoteToolUseCase {
|
||||
);
|
||||
|
||||
@Override
|
||||
public DailyQuoteResponse execute(DailyQuoteRequest req) {
|
||||
public DailyQuoteResponse getDailyQuote(DailyQuoteRequest req) {
|
||||
int index = new Random().nextInt(quotes.size());
|
||||
DailyQuoteResponse selected = quotes.get(index);
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class ExchangeRateToolUseCaseImpl implements ExchangeRateToolUseCase {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExchangeRateResponse execute(ExchangeRateRequest req) {
|
||||
public ExchangeRateResponse getExchangeRate(ExchangeRateRequest req) {
|
||||
String targetCurrency = req.getCurrencyCode() != null ? req.getCurrencyCode().toUpperCase().trim() : "USD";
|
||||
|
||||
// 간단한 모의 데이터로 반환 (실제 구현 시 외부 연동)
|
||||
|
||||
@@ -27,7 +27,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
public class TeamMemberUseCaseImpl implements TeamMemberUseCase {
|
||||
|
||||
@Override
|
||||
public Object execute(TeamMemberRequest req) {
|
||||
public Object getTeamMember(TeamMemberRequest req) {
|
||||
log.info("[A01] 신한라이프 MCP, TOOL 파트 구성원 조회 요청: {}", req);
|
||||
|
||||
String filter = req != null && req.getTeamName() != null ? req.getTeamName().toUpperCase() : "전체";
|
||||
|
||||
@@ -35,7 +35,7 @@ public class WeatherToolUseCaseImpl implements WeatherToolUseCase {
|
||||
public WeatherToolUseCaseImpl() {
|
||||
this.restClient = RestClient.create();
|
||||
}
|
||||
public WeatherResponse execute(WeatherRequest req) {
|
||||
public WeatherResponse getWeather(WeatherRequest req) {
|
||||
String city = req.city() != null ? req.city().trim() : "서울";
|
||||
|
||||
// 지역별 위경도 매핑 (간단한 예시)
|
||||
|
||||
@@ -23,5 +23,5 @@ public interface SolReqDetailUseCase {
|
||||
|
||||
@McpTool(name = "sol_request_detail", title = "SolReqDetail 툴", description = "SOL 의뢰서 상세 조회", annotations = @McpTool.McpAnnotations(openWorldHint = true, readOnlyHint = true))
|
||||
@ToolHint(register = false, requiresApproval = false, categoryKey = "sol", mappingId = "SOLG00000002")
|
||||
Object execute(SolReqDetailRequest req);
|
||||
Object getSolRequestDetail(SolReqDetailRequest req);
|
||||
}
|
||||
|
||||
@@ -8,5 +8,5 @@ import io.shinhanlife.dap.mcc.biz.sol.dto.SolReqListRequest;
|
||||
public interface SolReqListUseCase {
|
||||
@McpTool(name = "sol_request_list", title = "SolReqList 툴", description = "SOL 의뢰서 목록 조회해줘", annotations = @McpTool.McpAnnotations(openWorldHint = true))
|
||||
@ToolHint(register = false, requiresApproval = false, categoryKey = "sol", mappingId = "SOLG00000001")
|
||||
Object execute(SolReqListRequest req);
|
||||
Object searchSolRequests(SolReqListRequest req);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class SolReqDetailUseCaseImpl implements SolReqDetailUseCase {
|
||||
private boolean mockEnabled;
|
||||
|
||||
@Override
|
||||
public Object execute(SolReqDetailRequest req) {
|
||||
public Object getSolRequestDetail(SolReqDetailRequest req) {
|
||||
log.info("[MCI Tool] {} 요청 수신. 파라미터: {}", "solReqDetail", req);
|
||||
if (req == null || req.getSrId() == null || req.getSrId().isBlank()) {
|
||||
return Map.of("status", "ERROR", "message", "srId는 필수입니다.");
|
||||
|
||||
@@ -39,7 +39,7 @@ public class SolReqListUseCaseImpl implements SolReqListUseCase {
|
||||
private final SolReqListConverter converter;
|
||||
|
||||
@Override
|
||||
public Object execute(SolReqListRequest req) {
|
||||
public Object searchSolRequests(SolReqListRequest req) {
|
||||
log.info("[MCI Tool] {} 요청 수신. 파라미터: {}", "solReqList", req);
|
||||
try {
|
||||
SOLG00000001_I mciRequest = converter.toLegacyRequest(req);
|
||||
|
||||
@@ -10,7 +10,7 @@ class CustomerGuidanceToolUseCaseTest {
|
||||
|
||||
@Test
|
||||
void createsToolRequestAndResponseDtos() {
|
||||
assertNotNull(new CustomerGuidanceToolRequest());
|
||||
assertNotNull(new CustomerGuidanceToolResponse());
|
||||
assertNotNull(CustomerGuidanceToolRequest.builder().build());
|
||||
assertNotNull(CustomerGuidanceToolResponse.builder().build());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class Onnba3011UseCaseImplTest {
|
||||
when(converter.toMciRequest(request)).thenReturn(mciRequest);
|
||||
when(mciCfpaClient.callCfpa0001(mciRequest)).thenReturn("success");
|
||||
|
||||
Object result = useCase.execute(request);
|
||||
Object result = useCase.callOnnba3011(request);
|
||||
|
||||
assertEquals("success", result);
|
||||
verify(converter).toMciRequest(request);
|
||||
|
||||
@@ -36,7 +36,7 @@ class SolReqDetailUseCaseImplTest {
|
||||
SolReqDetailRequest request = new SolReqDetailRequest();
|
||||
request.setSrId("SR-2026-001");
|
||||
|
||||
SolReqDetailResponse response = (SolReqDetailResponse) useCase.execute(request);
|
||||
SolReqDetailResponse response = (SolReqDetailResponse) useCase.getSolRequestDetail(request);
|
||||
|
||||
assertThat(response.getSrId()).isEqualTo("SR-2026-001");
|
||||
assertThat(response.getSrName()).isEqualTo("AX HUB 메인 화면 UI 개편");
|
||||
|
||||
@@ -29,7 +29,7 @@ class SolReqListUseCaseImplTest {
|
||||
when(mci.callTo(eq("SOLG00000001"), eq("SOLG00000001"), eq(mciRequest), eq(SOLG00000001_O.class)))
|
||||
.thenReturn(new Transfer<>());
|
||||
|
||||
SolReqListResponse response = (SolReqListResponse) useCase.execute(request);
|
||||
SolReqListResponse response = (SolReqListResponse) useCase.searchSolRequests(request);
|
||||
|
||||
verify(converter).toLegacyRequest(request);
|
||||
verify(mci).callTo("SOLG00000001", "SOLG00000001", mciRequest, SOLG00000001_O.class);
|
||||
|
||||
Reference in New Issue
Block a user