refs #731: expose database game scope MCP
This commit is contained in:
@@ -20,7 +20,10 @@ public record McpProperties(
|
||||
String qaVectorStoreToolDescription,
|
||||
String fewShotNl2SqlToolName,
|
||||
String fewShotNl2SqlToolLabel,
|
||||
String fewShotNl2SqlToolDescription
|
||||
String fewShotNl2SqlToolDescription,
|
||||
String gameScopeToolName,
|
||||
String gameScopeToolLabel,
|
||||
String gameScopeToolDescription
|
||||
) {
|
||||
|
||||
private static final String DEFAULT_TOOL_NAME = "oracle.select_ai.data_text2sql";
|
||||
@@ -56,6 +59,12 @@ public record McpProperties(
|
||||
private static final String DEFAULT_FEW_SHOT_NL2SQL_TOOL_DESCRIPTION =
|
||||
"벡터 Few-shot 예제를 찾아 prompt에 반영하고, SHOWSQL로 생성한 읽기 전용 SQL을 실행합니다. "
|
||||
+ "Few-shot 근거, 생성 SQL, 실행 결과를 함께 반환합니다.";
|
||||
private static final String DEFAULT_GAME_SCOPE_TOOL_NAME =
|
||||
"oracle.select_ai.game_scope_resolve";
|
||||
private static final String DEFAULT_GAME_SCOPE_TOOL_LABEL = "게임 조회 범위 확인";
|
||||
private static final String DEFAULT_GAME_SCOPE_TOOL_DESCRIPTION =
|
||||
"질문에서 언급된 게임 별칭을 DB 게임 범위 view로 확인합니다. 데이터 SQL은 실행하지 않으며, "
|
||||
+ "반환된 SUPPORTED scope에만 Few-shot NL2SQL을 호출하세요.";
|
||||
|
||||
public String resolvedToolName() {
|
||||
return requiredOrDefault(toolName, DEFAULT_TOOL_NAME);
|
||||
@@ -121,6 +130,18 @@ public record McpProperties(
|
||||
return requiredOrDefault(fewShotNl2SqlToolDescription, DEFAULT_FEW_SHOT_NL2SQL_TOOL_DESCRIPTION);
|
||||
}
|
||||
|
||||
public String resolvedGameScopeToolName() {
|
||||
return requiredOrDefault(gameScopeToolName, DEFAULT_GAME_SCOPE_TOOL_NAME);
|
||||
}
|
||||
|
||||
public String resolvedGameScopeToolLabel() {
|
||||
return requiredOrDefault(gameScopeToolLabel, DEFAULT_GAME_SCOPE_TOOL_LABEL);
|
||||
}
|
||||
|
||||
public String resolvedGameScopeToolDescription() {
|
||||
return requiredOrDefault(gameScopeToolDescription, DEFAULT_GAME_SCOPE_TOOL_DESCRIPTION);
|
||||
}
|
||||
|
||||
private String requiredOrDefault(String value, String fallback) {
|
||||
return value == null || value.isBlank() ? fallback : value.trim();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user