refs #726: add Select AI SHOWPROMPT diagnostic tool
This commit is contained in:
@@ -8,7 +8,10 @@ public record McpProperties(
|
||||
String toolName,
|
||||
String toolLabel,
|
||||
String toolDescription,
|
||||
String promptDescription
|
||||
String promptDescription,
|
||||
String showpromptToolName,
|
||||
String showpromptToolLabel,
|
||||
String showpromptToolDescription
|
||||
) {
|
||||
|
||||
private static final String DEFAULT_TOOL_NAME = "oracle.select_ai.data_text2sql";
|
||||
@@ -18,6 +21,13 @@ public record McpProperties(
|
||||
+ "생성 SQL과 최대 100건의 조회 결과를 함께 반환하며 DDL/DML/잠금/패키지 호출은 실행하지 않습니다.";
|
||||
private static final String DEFAULT_PROMPT_DESCRIPTION =
|
||||
"업무 데이터에서 조회할 내용을 자연어로 입력합니다.";
|
||||
private static final String DEFAULT_SHOWPROMPT_TOOL_NAME =
|
||||
"oracle.select_ai.data_showprompt";
|
||||
private static final String DEFAULT_SHOWPROMPT_TOOL_LABEL =
|
||||
"업무 데이터 SHOWPROMPT";
|
||||
private static final String DEFAULT_SHOWPROMPT_TOOL_DESCRIPTION =
|
||||
"Select AI가 SQL 생성에 사용한 prompt를 조회하는 읽기 전용 진단 도구입니다. "
|
||||
+ "생성 SQL이나 데이터 조회 SQL은 실행하지 않습니다.";
|
||||
|
||||
public String resolvedToolName() {
|
||||
return requiredOrDefault(toolName, DEFAULT_TOOL_NAME);
|
||||
@@ -35,6 +45,18 @@ public record McpProperties(
|
||||
return requiredOrDefault(promptDescription, DEFAULT_PROMPT_DESCRIPTION);
|
||||
}
|
||||
|
||||
public String resolvedShowpromptToolName() {
|
||||
return requiredOrDefault(showpromptToolName, DEFAULT_SHOWPROMPT_TOOL_NAME);
|
||||
}
|
||||
|
||||
public String resolvedShowpromptToolLabel() {
|
||||
return requiredOrDefault(showpromptToolLabel, DEFAULT_SHOWPROMPT_TOOL_LABEL);
|
||||
}
|
||||
|
||||
public String resolvedShowpromptToolDescription() {
|
||||
return requiredOrDefault(showpromptToolDescription, DEFAULT_SHOWPROMPT_TOOL_DESCRIPTION);
|
||||
}
|
||||
|
||||
private String requiredOrDefault(String value, String fallback) {
|
||||
return value == null || value.isBlank() ? fallback : value.trim();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user