McpFunction에 MCP 표준 힌트 4개 추가
This commit is contained in:
@@ -71,6 +71,18 @@ 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;
|
||||
|
||||
|
||||
|
||||
// 3. 연동 아키텍처 구분 (DIRECT / MCI_EAI)
|
||||
@@ -113,4 +125,4 @@ public class ToolMetadata {
|
||||
if (parametersSchema == null || !parametersSchema.containsKey("required")) return Set.of();
|
||||
return new HashSet<>((List<String>) parametersSchema.get("required"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,12 @@ public class RegistryMcpToolSpecificationFactory {
|
||||
.name(entry.getName())
|
||||
.description(description(entry))
|
||||
.inputSchema(inputSchema(entry))
|
||||
.annotations(McpSchema.ToolAnnotations.builder()
|
||||
.readOnlyHint(Boolean.TRUE.equals(entry.getReadOnlyHint()))
|
||||
.destructiveHint(Boolean.TRUE.equals(entry.getDestructiveHint()))
|
||||
.idempotentHint(Boolean.TRUE.equals(entry.getIdempotentHint()))
|
||||
.openWorldHint(Boolean.TRUE.equals(entry.getOpenWorldHint()))
|
||||
.build())
|
||||
.build();
|
||||
|
||||
return McpServerFeatures.SyncToolSpecification.builder()
|
||||
|
||||
Reference in New Issue
Block a user