McpFunction에 MCP 표준 힌트 4개 추가
This commit is contained in:
@@ -39,5 +39,10 @@ public @interface McpFunction {
|
||||
// 추가: HITL 승인 체계 지원 (실행 전 사용자 승인 필요 여부)
|
||||
boolean requiresApproval() default false;
|
||||
|
||||
boolean readOnlyHint() default false;
|
||||
boolean destructiveHint() default false;
|
||||
boolean idempotentHint() default false;
|
||||
boolean openWorldHint() default false;
|
||||
|
||||
// 추가: 툴 별 기본 Timeout 설정 (기본 300초 = 300000ms)
|
||||
}
|
||||
|
||||
@@ -58,6 +58,17 @@ public class ToolMetadata {
|
||||
@Builder.Default
|
||||
private Boolean requiresApproval = false;
|
||||
|
||||
@Builder.Default
|
||||
private Boolean readOnlyHint = false;
|
||||
|
||||
@Builder.Default
|
||||
private Boolean destructiveHint = false;
|
||||
|
||||
@Builder.Default
|
||||
private Boolean idempotentHint = false;
|
||||
|
||||
@Builder.Default
|
||||
private Boolean openWorldHint = false;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,6 +107,10 @@ public class ToolRegistryHeartbeatSender {
|
||||
meta.setVisible(isVisible);
|
||||
meta.setIsRegistered(isRegister);
|
||||
meta.setRequiresApproval(functionAnnotation.requiresApproval());
|
||||
meta.setReadOnlyHint(functionAnnotation.readOnlyHint());
|
||||
meta.setDestructiveHint(functionAnnotation.destructiveHint());
|
||||
meta.setIdempotentHint(functionAnnotation.idempotentHint());
|
||||
meta.setOpenWorldHint(functionAnnotation.openWorldHint());
|
||||
|
||||
Map<String, String> prompts = new HashMap<>();
|
||||
String promptText = functionAnnotation.prompt();
|
||||
@@ -174,4 +178,4 @@ public class ToolRegistryHeartbeatSender {
|
||||
log.error(" [HeartbeatSender] 툴 등록 실패: {}", ex.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user