Interface McpToolSource
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Source of MCP-derived
CallableTools for an AgenticHarness. The set of
participating connections is fixed when the source is built (on the gateway, typically via
GatewayAiContext.mcpToolsFor(names)); each getMcpTools() call re-lists tools on those
already-resolved connections. Attach via AiContext.HarnessBuilder.mcpTools(McpToolSource). The empty default lets non-MCP code paths
construct a harness without wiring an MCP integration.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionTools to contribute to the harness's tool set.
-
Field Details
-
EMPTY
Source that contributes no tools. Default for callers that don't integrate MCP.
-
-
Method Details
-
getMcpTools
List<CallableTool> getMcpTools()Tools to contribute to the harness's tool set. Called once at the start of each turn, not at harness construction, so a reconnected or reconfigured connection takes effect on the next message instead of requiring the harness to be rebuilt. Expect a live round-trip per call.
-