Annotation Interface McpToolBox
When used on a method of an AiService annotated with
RegisterAiService, the method will use the tools
provided by the MCP servers named in value. If no name is provided then the method will automatically
use all the MCP servers available.
By default, the RegisterAiService won't use any tools provided by the configured MCP servers, so it is
mandatory to add this annotation on methods that needs to use them.
Note that the filtering of the named MCP servers is possible only if the MCP extension is allowed to automatically
generate a ToolProvider that is wired up to all the configured MCP clients,
i.e. the quarkus.langchain4j.mcp.generate-tool-provider property is set to true (which is the default value).
Conversely, if the AI service uses a custom ToolProvider than this annotation will have no effect and the
wiring of specific MCP clients will have to be encoded in the ToolProvider itself.-
Optional Element Summary
Optional Elements
-
Element Details
-
value
String[] valueMCP servers to use. In case novalueis provided it will use all the MCP servers available.- Default:
{}
-