forked from kimhyungsik/ax_hub_mcp_tool
Fix: ObjectNode 직렬화 시 getter 속성 노출 오류 수정
This commit is contained in:
@@ -20,6 +20,11 @@ public class GuardrailService {
|
||||
* ToolMetadata에 정의된 required/allowed arguments 기준으로 요청 인자를 검증합니다.
|
||||
*/
|
||||
public void validate(ToolMetadata metadata, ObjectNode arguments) {
|
||||
if (metadata.getParametersSchema() == null) {
|
||||
// 스키마 정보가 없으면(Fallback 툴 등) 검증을 생략합니다.
|
||||
return;
|
||||
}
|
||||
|
||||
Iterator<String> fieldNames = arguments.fieldNames();
|
||||
while (fieldNames.hasNext()) {
|
||||
String fieldName = fieldNames.next();
|
||||
|
||||
@@ -121,6 +121,11 @@ public class ExecuteService {
|
||||
}
|
||||
|
||||
Object result = executeWithResilience(context, metadata, argumentsNode, payload);
|
||||
|
||||
if (result instanceof com.fasterxml.jackson.databind.JsonNode) {
|
||||
result = objectMapper.convertValue(result, Object.class);
|
||||
}
|
||||
|
||||
long elapsedMillis = elapsedMillis(startedAt);
|
||||
|
||||
String responseText = "";
|
||||
|
||||
@@ -74,6 +74,7 @@ public class ToolPlanner {
|
||||
|
||||
toolMetadata = ToolMetadata.builder()
|
||||
.uid(toolName)
|
||||
.name(toolName)
|
||||
.integrationType("DIRECT")
|
||||
.podUrl(fallbackPodUrl)
|
||||
.build();
|
||||
|
||||
Reference in New Issue
Block a user