Fix Metadata Tool (#23175)

This commit is contained in:
Mohit Yadav 2025-09-01 14:02:55 +05:30 committed by GitHub
parent 6b65b5d075
commit ae71cf4501
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -166,7 +166,7 @@ public class SearchMetadataTool implements McpTool {
"SearchMetadataTool does not support limits enforcement.");
}
private Map<String, Object> buildEnhancedSearchResponse(
public static Map<String, Object> buildEnhancedSearchResponse(
Map<String, Object> searchResponse,
String query,
int requestedLimit,
@ -226,7 +226,7 @@ public class SearchMetadataTool implements McpTool {
return result;
}
private Map<String, Object> cleanSearchResult(
public static Map<String, Object> cleanSearchResult(
Map<String, Object> source, List<String> requestedFields) {
Map<String, Object> result = new HashMap<>();
@ -247,7 +247,7 @@ public class SearchMetadataTool implements McpTool {
return result;
}
private Map<String, Object> createEmptyResponse() {
public static Map<String, Object> createEmptyResponse() {
Map<String, Object> result = new HashMap<>();
result.put("results", Collections.emptyList());
result.put("totalFound", 0);