Fix MCP function name collision causing incorrect EIMS routing
This commit is contained in:
@@ -13,12 +13,12 @@ import io.shinhanlife.axhub.biz.mcp.tool.dto.ContractDetailReq;
|
||||
)
|
||||
public class ContractInquiryService extends AbstractMcpToolService {
|
||||
|
||||
@McpFunction(name = "status", description = "계약상태 조회", prompt = "김신한 고객의 현재 계약 상태를 조회해줘.", mappingId = "CNTR_001")
|
||||
@McpFunction(name = "contract_status", description = "계약상태 조회", prompt = "김신한 고객의 현재 계약 상태를 조회해줘.", mappingId = "CNTR_001")
|
||||
public Object getStatus(ContractStatusReq data) {
|
||||
return executeLegacy("HTTP", "CNTR_001", data);
|
||||
}
|
||||
|
||||
@McpFunction(name = "detail", description = "계약상세 조회", prompt = "김신한 고객의 계약 상세 내역을 알려줘.", mappingId = "CNTR_002")
|
||||
@McpFunction(name = "contract_detail", description = "계약상세 조회", prompt = "김신한 고객의 계약 상세 내역을 알려줘.", mappingId = "CNTR_002")
|
||||
public Object getDetail(ContractDetailReq data) {
|
||||
return executeLegacy("HTTP", "CNTR_002", data);
|
||||
}
|
||||
|
||||
27
test_call_detail.py
Normal file
27
test_call_detail.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import urllib.request
|
||||
import json
|
||||
|
||||
payload = {
|
||||
"jsonrpc": "2.0",
|
||||
"method": "tools/call",
|
||||
"params": {
|
||||
"name": "detail",
|
||||
"arguments": { "cust_id": "C001" }
|
||||
},
|
||||
"id": 1
|
||||
}
|
||||
|
||||
url = 'http://localhost:8081/mcp/api/v1/tools/call'
|
||||
headers = {
|
||||
'Content-Type': 'application/json',
|
||||
'X-API-KEY': 'SHINHAN_MCP_TEST_KEY_9999'
|
||||
}
|
||||
|
||||
data = json.dumps(payload).encode('utf-8')
|
||||
req = urllib.request.Request(url, data=data, headers=headers, method='POST')
|
||||
|
||||
try:
|
||||
with urllib.request.urlopen(req) as response:
|
||||
print(f"Response: {response.read().decode('utf-8')}")
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
Reference in New Issue
Block a user