Class ListAndCall

java.lang.Object
ai.redouble.examples.mcpclient.ListAndCall

public class ListAndCall extends Object
Connecting to an MCP server the generic way, with no server-specific code: name the endpoint, attach, and every tool the server grants is ready to hand to an agent (thinker.addTool(provider), shown to the model as orders_order_status: handle, underscore, the tool's own name) or to call from code, as here. Start ai.redouble.examples.mcpserver.OrdersOverMcp first; this main talks to it on localhost.

Notice what travels: the arguments are an untyped JSON object spelled to match a schema this code never sees, and the result is text to pick apart. For browsing and one-off calls that generality is exactly right; for a tool your workflows depend on, wrap it as ai.redouble.examples.mcpwrap does.

Since:
0.1 (2026-09-28)
Author:
Andrey Santrosyan
  • Constructor Details

    • ListAndCall

      public ListAndCall()
  • Method Details