Skip to content

Commit a36a088

Browse files
committed
docs: align arguments formatting and complete reverse method arguments in MCP example
1 parent 1c7e7e3 commit a36a088

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

index.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ <h3 id="mcp-title">AI Ready (MCP)</h3>
212212
import org.tinystruct.system.annotation.Action;
213213
import org.tinystruct.system.annotation.Argument;
214214

215-
// Run with: bin/dispatcher start --import org.tinystruct.system.HttpServer --import com.example.HelloMCPServer
215+
// Run with: bin/dispatcher start --import org.tinystruct.system.HttpServer \
216+
// --import com.example.HelloMCPServer
216217
public class HelloMCPServer extends MCPServer {
217218
@Override
218219
public void init() {
@@ -223,14 +224,18 @@ <h3 id="mcp-title">AI Ready (MCP)</h3>
223224
}
224225

225226
public class StringHelper {
226-
@Action(value = "string/uppercase", description = "Convert to uppercase", arguments = {
227+
@Action(value = "string/uppercase", description = "Convert to uppercase",
228+
arguments = {
227229
@Argument(key = "text", description = "The text to convert", type = "string")
228230
})
229231
public String toUpperCase(String text) {
230232
return text == null ? null : text.toUpperCase();
231233
}
232234

233-
@Action(value = "string/reverse", description = "Reverse a string")
235+
@Action(value = "string/reverse", description = "Reverse a string",
236+
arguments = {
237+
@Argument(key = "text", description = "The text to reverse", type = "string")
238+
})
234239
public String reverse() {
235240
Object text = getContext().getAttribute("text");
236241
return text != null ? new StringBuilder(text.toString()).reverse().toString() : "";

0 commit comments

Comments
 (0)