forked from kimhyungsik/ax_hub_mcp_tool
feat(was-lib): map GrowToolHint metadata fields to ToolMetadata in ToolScanner
All checks were successful
Deploy Tools / deploy (push) Successful in 2m21s
All checks were successful
Deploy Tools / deploy (push) Successful in 2m21s
This commit is contained in:
@@ -164,6 +164,18 @@ public class ToolRegistryHeartbeatSender {
|
||||
meta.setOpenWorldHint(true);
|
||||
}
|
||||
|
||||
if (hintAnnotation != null) {
|
||||
if (!hintAnnotation.displayDescription().isBlank()) meta.setDisplayDescription(hintAnnotation.displayDescription());
|
||||
if (!hintAnnotation.functionDescription().isBlank()) meta.setFunctionDescription(hintAnnotation.functionDescription());
|
||||
if (!hintAnnotation.whenToUse().isBlank()) meta.setWhenToUse(hintAnnotation.whenToUse());
|
||||
if (!hintAnnotation.whenNotToUse().isBlank()) meta.setWhenNotToUse(hintAnnotation.whenNotToUse());
|
||||
if (!hintAnnotation.ioLimits().isBlank()) meta.setIoLimits(hintAnnotation.ioLimits());
|
||||
if (hintAnnotation.exampleQueries().length > 0) meta.setExampleQueries(java.util.List.of(hintAnnotation.exampleQueries()));
|
||||
if (hintAnnotation.tags().length > 0) meta.setTags(java.util.List.of(hintAnnotation.tags()));
|
||||
if (hintAnnotation.requiredEnvKeys().length > 0) meta.setRequiredEnvKeys(java.util.List.of(hintAnnotation.requiredEnvKeys()));
|
||||
if (!hintAnnotation.ownerOrg().isBlank()) meta.setOwnerOrg(hintAnnotation.ownerOrg());
|
||||
}
|
||||
|
||||
Map<String, String> prompts = new HashMap<>();
|
||||
|
||||
meta.setActionPrompts(prompts);
|
||||
|
||||
Reference in New Issue
Block a user