Class FleetTools

java.lang.Object
ai.badmonkey.agentspaces.springai.tools.FleetTools

public class FleetTools extends Object
The fleet's tools, as the bean applications inject. Attach them to a ChatClient explicitly:
ChatClient chat = builder.defaultToolCallbacks(fleetTools.toolCallbacks()).build();

This bean is deliberately not a ToolCallbackProvider itself. Spring AI's MCP server auto-configuration publishes every ToolCallbackProvider bean to outside MCP clients, and the fleet crosses that trust boundary only through the MCP export (F7), which exposes nothing until a deployment names the agents it may.

  • Constructor Details

    • FleetTools

      public FleetTools(FleetToolCallbackProvider provider)
      Wraps a provider.
      Parameters:
      provider - the live fleet tool provider
  • Method Details

    • toolCallbacks

      public org.springframework.ai.tool.ToolCallbackProvider toolCallbacks()
      The live tool set, to attach to a ChatClient; each request sees the current fleet.
    • current

      public List<org.springframework.ai.tool.ToolCallback> current()
      The current tool set.
    • refresh

      public List<org.springframework.ai.tool.ToolCallback> refresh()
      Rebuilds the tool set now and reports any change.
    • provider

      public FleetToolCallbackProvider provider()
      The underlying provider.