File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -222,13 +222,19 @@ <h3 id="mcp-title">AI Ready (MCP)</h3>
222222 this.registerTool(new StringHelper());
223223 }
224224
225- public static class StringHelper {
225+ public class StringHelper {
226226 @Action(value = "string/uppercase", description = "Convert to uppercase", arguments = {
227227 @Argument(key = "text", description = "The text to convert", type = "string")
228228 })
229229 public String toUpperCase(String text) {
230230 return text == null ? null : text.toUpperCase();
231231 }
232+
233+ @Action(value = "string/reverse", description = "Reverse a string")
234+ public String reverse() {
235+ Object text = getContext().getAttribute("text");
236+ return text != null ? new StringBuilder(text.toString()).reverse().toString() : "";
237+ }
232238 }
233239}</ code > </ pre >
234240 </ div >
You can’t perform that action at this time.
0 commit comments