@@ -12,6 +12,7 @@ public final class McpToolDefinition {
1212 private final String description ;
1313 private final String displayTitle ;
1414 private final String displayDescription ;
15+ private final String category ;
1516 private final Map <String , Object > inputSchema ;
1617 private final Map <String , Object > outputSchema ;
1718 private final McpToolAnnotations annotations ;
@@ -32,6 +33,8 @@ private McpToolDefinition(Builder builder) {
3233 this .description = Objects .requireNonNullElse (builder .description , "" );
3334 this .displayTitle = builder .displayTitle == null ? this .title : builder .displayTitle ;
3435 this .displayDescription = Objects .requireNonNullElse (builder .displayDescription , this .description );
36+ this .category = builder .category == null || builder .category .isBlank ()
37+ ? "PLUGIN" : builder .category .trim ();
3538 this .inputSchema = copySchema (builder .inputSchema );
3639 this .outputSchema = builder .outputSchema == null ? null : copySchema (builder .outputSchema );
3740 this .annotations = Objects .requireNonNullElse (
@@ -70,6 +73,11 @@ public String displayDescription() {
7073 return displayDescription ;
7174 }
7275
76+ /** Business category within the plugin in Halo's management UI. Defaults to PLUGIN. */
77+ public String category () {
78+ return category ;
79+ }
80+
7381 public Map <String , Object > inputSchema () {
7482 return inputSchema ;
7583 }
@@ -100,6 +108,7 @@ public static final class Builder {
100108 private String description ;
101109 private String displayTitle ;
102110 private String displayDescription ;
111+ private String category ;
103112 private Map <String , Object > inputSchema ;
104113 private Map <String , Object > outputSchema ;
105114 private McpToolAnnotations annotations ;
@@ -131,6 +140,11 @@ public Builder displayDescription(String displayDescription) {
131140 return this ;
132141 }
133142
143+ public Builder category (String category ) {
144+ this .category = category ;
145+ return this ;
146+ }
147+
134148 public Builder inputSchema (Map <String , Object > inputSchema ) {
135149 this .inputSchema = inputSchema ;
136150 return this ;
0 commit comments