feat: Add sms, email tool services and clean up McpTool annotation
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package io.shinhanlife.axhub.biz.mcp.tool.email;
|
||||
|
||||
import io.shinhanlife.axhub.biz.mcp.tool.annotation.McpFunction;
|
||||
import io.shinhanlife.axhub.biz.mcp.tool.annotation.McpTool;
|
||||
import io.shinhanlife.axhub.biz.mcp.tool.dto.EmailSendReq;
|
||||
import io.shinhanlife.axhub.biz.mcp.tool.service.AbstractMcpToolService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@McpTool(routingType = "EAI")
|
||||
public class EmailToolService extends AbstractMcpToolService {
|
||||
|
||||
@McpFunction(name = "send_email", description = "이메일 발송", prompt = "고객에게 이메일을 발송해줘.", mappingId = "EMAIL_SEND_001")
|
||||
public Object sendEmail(EmailSendReq req) {
|
||||
log.info("📧 [Email] 이메일 발송 요청 수신. 수신자: {}", req.getEmailAddress());
|
||||
|
||||
// EAI 연동을 위한 파라미터 변환
|
||||
Map<String, Object> payload = new HashMap<>();
|
||||
payload.put("address", req.getEmailAddress());
|
||||
payload.put("subject", req.getSubject());
|
||||
payload.put("content", req.getBody());
|
||||
|
||||
// 레거시 시스템 연동 (EAI)
|
||||
Map<String, Object> result = executeLegacy("EAI", "EMAIL_SEND_001", payload);
|
||||
|
||||
// 결과 가공
|
||||
if ("SUCCESS".equals(result.get("status"))) {
|
||||
result.put("message", "이메일이 성공적으로 발송되었습니다.");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -6,13 +6,13 @@ spring.datasource.password=password
|
||||
|
||||
spring.h2.console.enabled=true
|
||||
# EIMS 동적 라우팅 접속 정보
|
||||
eims.http.url=http://localhost:/api/gateway
|
||||
eims.http.url=http://localhost:${server.port}/api/gateway
|
||||
eims.tcp.host=127.0.0.1
|
||||
eims.tcp.port=8090
|
||||
eims.tcp.timeout=5000
|
||||
eims.jsp.form.url=http://localhost:/mock/jsp-form
|
||||
eims.jsp.json.url=http://localhost:/mock/jsp-json
|
||||
eims.mci.url=http://localhost:/mock/esb/api
|
||||
eims.jsp.form.url=http://localhost:${server.port}/mock/jsp-form
|
||||
eims.jsp.json.url=http://localhost:${server.port}/mock/jsp-json
|
||||
eims.mci.url=http://localhost:${server.port}/mock/esb/api
|
||||
|
||||
# API 보안 키 설정
|
||||
mcp.security.api-keys.SHINHAN_MCP_SECRET_KEY_2026=mcp-client-1
|
||||
@@ -21,6 +21,12 @@ mcp.security.tenant-domains.mcp-client-1=CUSTOMER,COMMON
|
||||
mcp.security.tenant-domains.mcp-client-2=ALL
|
||||
|
||||
# Gateway/Tool URLs
|
||||
mcp.adapter.url=http://localhost:/rpc/v1/execute
|
||||
mcp.gateway.url=http://localhost:/mcp/api/v1
|
||||
mcp.adapter.url=http://localhost:${server.port}/rpc/v1/execute
|
||||
mcp.gateway.url=http://localhost:${server.port}/mcp/api/v1
|
||||
mcp.tool.host=localhost
|
||||
|
||||
# Disable Kafka
|
||||
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration
|
||||
|
||||
# Suppress Kafka Connection Logs
|
||||
logging.level.org.apache.kafka=ERROR
|
||||
|
||||
@@ -2,3 +2,6 @@ server.port=8083
|
||||
spring.application.name=axhub-tool-email
|
||||
|
||||
spring.profiles.active=local
|
||||
|
||||
# Suppress Kafka Connection Logs
|
||||
logging.level.org.apache.kafka=ERROR
|
||||
|
||||
Reference in New Issue
Block a user