Uses of Interface
org.springframework.ai.tool.ToolCallback
Packages that use ToolCallback
Package
Description
Chat client.
Provides the API for chat client advisors.
Core support for Model Context Protocol (MCP) integration in Spring AI.
-
Uses of ToolCallback in org.springframework.ai.anthropic
Methods in org.springframework.ai.anthropic that return types with arguments of type ToolCallbackMethods in org.springframework.ai.anthropic with parameters of type ToolCallbackModifier and TypeMethodDescriptionAnthropicChatOptions.Builder.toolCallbacks
(ToolCallback... toolCallbacks) Method parameters in org.springframework.ai.anthropic with type arguments of type ToolCallbackModifier and TypeMethodDescriptionvoid
AnthropicChatOptions.setToolCallbacks
(List<ToolCallback> toolCallbacks) AnthropicChatOptions.Builder.toolCallbacks
(List<ToolCallback> toolCallbacks) -
Uses of ToolCallback in org.springframework.ai.azure.openai
Methods in org.springframework.ai.azure.openai that return types with arguments of type ToolCallbackMethods in org.springframework.ai.azure.openai with parameters of type ToolCallbackModifier and TypeMethodDescriptionAzureOpenAiChatOptions.Builder.toolCallbacks
(ToolCallback... toolCallbacks) Method parameters in org.springframework.ai.azure.openai with type arguments of type ToolCallbackModifier and TypeMethodDescriptionvoid
AzureOpenAiChatOptions.setToolCallbacks
(List<ToolCallback> toolCallbacks) AzureOpenAiChatOptions.Builder.toolCallbacks
(List<ToolCallback> toolCallbacks) -
Uses of ToolCallback in org.springframework.ai.chat.client
Methods in org.springframework.ai.chat.client that return types with arguments of type ToolCallbackModifier and TypeMethodDescriptionDefaultChatClient.DefaultChatClientRequestSpec.getToolCallbacks()
Methods in org.springframework.ai.chat.client with parameters of type ToolCallbackModifier and TypeMethodDescriptionChatClient.Builder.defaultTools
(ToolCallback... toolCallbacks) DefaultChatClientBuilder.defaultTools
(ToolCallback... toolCallbacks) ChatClient.ChatClientRequestSpec.tools
(ToolCallback... toolCallbacks) DefaultChatClient.DefaultChatClientRequestSpec.tools
(ToolCallback... toolCallbacks) Method parameters in org.springframework.ai.chat.client with type arguments of type ToolCallbackModifier and TypeMethodDescriptionChatClient.Builder.defaultTools
(List<ToolCallback> toolCallbacks) DefaultChatClientBuilder.defaultTools
(List<ToolCallback> toolCallbacks) ChatClient.ChatClientRequestSpec.tools
(List<ToolCallback> toolCallbacks) DefaultChatClient.DefaultChatClientRequestSpec.tools
(List<ToolCallback> toolCallbacks) Constructor parameters in org.springframework.ai.chat.client with type arguments of type ToolCallbackModifierConstructorDescriptionDefaultChatClientRequestSpec
(ChatModel chatModel, String userText, Map<String, Object> userParams, String systemText, Map<String, Object> systemParams, List<ToolCallback> toolCallbacks, List<Message> messages, List<String> toolNames, List<Media> media, ChatOptions chatOptions, List<Advisor> advisors, Map<String, Object> advisorParams, io.micrometer.observation.ObservationRegistry observationRegistry, ChatClientObservationConvention observationConvention, Map<String, Object> toolContext) -
Uses of ToolCallback in org.springframework.ai.chat.client.advisor.api
Methods in org.springframework.ai.chat.client.advisor.api that return types with arguments of type ToolCallbackModifier and TypeMethodDescriptionAdvisedRequest.toolCallbacks()
Deprecated.Returns the value of thetoolCallbacks
record component.Method parameters in org.springframework.ai.chat.client.advisor.api with type arguments of type ToolCallbackModifier and TypeMethodDescriptionAdvisedRequest.Builder.functionCallbacks
(List<ToolCallback> toolCallbacks) Set the tool callbacks. -
Uses of ToolCallback in org.springframework.ai.mcp
Classes in org.springframework.ai.mcp that implement ToolCallbackModifier and TypeClassDescriptionclass
Implementation ofToolCallback
that adapts MCP tools to Spring AI's tool interface with asynchronous execution support.class
Implementation ofToolCallback
that adapts MCP tools to Spring AI's tool interface.Methods in org.springframework.ai.mcp that return ToolCallbackModifier and TypeMethodDescriptionAsyncMcpToolCallbackProvider.getToolCallbacks()
Discovers and returns all available tools from the configured MCP servers.SyncMcpToolCallbackProvider.getToolCallbacks()
Discovers and returns all available tools from all connected MCP servers.Methods in org.springframework.ai.mcp that return types with arguments of type ToolCallbackModifier and TypeMethodDescriptionstatic reactor.core.publisher.Flux<ToolCallback>
AsyncMcpToolCallbackProvider.asyncToolCallbacks
(List<io.modelcontextprotocol.client.McpAsyncClient> mcpClients) Creates a reactive stream of tool callbacks from multiple MCP clients.static List<ToolCallback>
McpToolUtils.getToolCallbacksFromAsyncClients
(io.modelcontextprotocol.client.McpAsyncClient... asyncMcpClients) Convenience method to get tool callbacks from multiple asynchronous MCP clients.static List<ToolCallback>
McpToolUtils.getToolCallbacksFromAsyncClients
(List<io.modelcontextprotocol.client.McpAsyncClient> asyncMcpClients) Gets tool callbacks from a list of asynchronous MCP clients.static List<ToolCallback>
McpToolUtils.getToolCallbacksFromSyncClients
(io.modelcontextprotocol.client.McpSyncClient... mcpClients) Convenience method to get tool callbacks from multiple synchronous MCP clients.static List<ToolCallback>
McpToolUtils.getToolCallbacksFromSyncClients
(List<io.modelcontextprotocol.client.McpSyncClient> mcpClients) Gets tool callbacks from a list of synchronous MCP clients.static List<ToolCallback>
SyncMcpToolCallbackProvider.syncToolCallbacks
(List<io.modelcontextprotocol.client.McpSyncClient> mcpClients) Creates a consolidated list of tool callbacks from multiple MCP clients.Methods in org.springframework.ai.mcp with parameters of type ToolCallbackModifier and TypeMethodDescriptionstatic io.modelcontextprotocol.server.McpServerFeatures.AsyncToolSpecification
McpToolUtils.toAsyncToolSpecification
(ToolCallback toolCallback) Converts a Spring AI tool callback to an MCP asynchronous tool registration.static io.modelcontextprotocol.server.McpServerFeatures.AsyncToolSpecification
McpToolUtils.toAsyncToolSpecification
(ToolCallback toolCallback, org.springframework.util.MimeType mimeType) Converts a Spring AI tool callback to an MCP asynchronous tool specification.static List<io.modelcontextprotocol.server.McpServerFeatures.AsyncToolSpecification>
McpToolUtils.toAsyncToolSpecifications
(ToolCallback... toolCallbacks) Convenience method to convert a variable number of tool callbacks to MCP asynchronous tool specificaiton.static io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification
McpToolUtils.toSyncToolSpecification
(ToolCallback toolCallback) Converts a Spring AI ToolCallback to an MCP SyncToolSpecification.static io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification
McpToolUtils.toSyncToolSpecification
(ToolCallback toolCallback, org.springframework.util.MimeType mimeType) Converts a Spring AI ToolCallback to an MCP SyncToolSpecification.static List<io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification>
McpToolUtils.toSyncToolSpecifications
(ToolCallback... toolCallbacks) Convenience method to convert a variable number of tool callbacks to MCP synchronous tool specification.Method parameters in org.springframework.ai.mcp with type arguments of type ToolCallbackModifier and TypeMethodDescriptionstatic List<io.modelcontextprotocol.server.McpServerFeatures.AsyncToolSpecification>
McpToolUtils.toAsyncToolSpecifications
(List<ToolCallback> toolCallbacks) Converts a list of Spring AI tool callbacks to MCP asynchronous tool specificaiton.static List<io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification>
McpToolUtils.toSyncToolSpecification
(List<ToolCallback> toolCallbacks) Converts a list of Spring AI tool callbacks to MCP synchronous tool specificaiton. -
Uses of ToolCallback in org.springframework.ai.mcp.server.autoconfigure
Method parameters in org.springframework.ai.mcp.server.autoconfigure with type arguments of type ToolCallbackModifier and TypeMethodDescriptionList<io.modelcontextprotocol.server.McpServerFeatures.AsyncToolSpecification>
McpServerAutoConfiguration.asyncTools
(org.springframework.beans.factory.ObjectProvider<List<ToolCallback>> toolCalls, List<ToolCallback> toolCallbackList, McpServerProperties serverProperties) List<io.modelcontextprotocol.server.McpServerFeatures.AsyncToolSpecification>
McpServerAutoConfiguration.asyncTools
(org.springframework.beans.factory.ObjectProvider<List<ToolCallback>> toolCalls, List<ToolCallback> toolCallbackList, McpServerProperties serverProperties) List<io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification>
McpServerAutoConfiguration.syncTools
(org.springframework.beans.factory.ObjectProvider<List<ToolCallback>> toolCalls, List<ToolCallback> toolCallbacksList, McpServerProperties serverProperties) List<io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification>
McpServerAutoConfiguration.syncTools
(org.springframework.beans.factory.ObjectProvider<List<ToolCallback>> toolCalls, List<ToolCallback> toolCallbacksList, McpServerProperties serverProperties) -
Uses of ToolCallback in org.springframework.ai.minimax
Methods in org.springframework.ai.minimax that return types with arguments of type ToolCallbackMethods in org.springframework.ai.minimax with parameters of type ToolCallbackModifier and TypeMethodDescriptionMiniMaxChatOptions.Builder.toolCallbacks
(ToolCallback... toolCallbacks) Method parameters in org.springframework.ai.minimax with type arguments of type ToolCallbackModifier and TypeMethodDescriptionvoid
MiniMaxChatOptions.setToolCallbacks
(List<ToolCallback> toolCallbacks) MiniMaxChatOptions.Builder.toolCallbacks
(List<ToolCallback> toolCallbacks) -
Uses of ToolCallback in org.springframework.ai.mistralai
Methods in org.springframework.ai.mistralai that return types with arguments of type ToolCallbackMethods in org.springframework.ai.mistralai with parameters of type ToolCallbackModifier and TypeMethodDescriptionMistralAiChatOptions.Builder.toolCallbacks
(ToolCallback... toolCallbacks) Method parameters in org.springframework.ai.mistralai with type arguments of type ToolCallbackModifier and TypeMethodDescriptionvoid
MistralAiChatOptions.setToolCallbacks
(List<ToolCallback> toolCallbacks) MistralAiChatOptions.Builder.toolCallbacks
(List<ToolCallback> toolCallbacks) -
Uses of ToolCallback in org.springframework.ai.model.tool
Methods in org.springframework.ai.model.tool that return types with arguments of type ToolCallbackModifier and TypeMethodDescriptionDefaultToolCallingChatOptions.getToolCallbacks()
ToolCallingChatOptions.getToolCallbacks()
ToolCallbacks to be registered with the ChatModel.static List<ToolCallback>
ToolCallingChatOptions.mergeToolCallbacks
(List<ToolCallback> runtimeToolCallbacks, List<ToolCallback> defaultToolCallbacks) Methods in org.springframework.ai.model.tool with parameters of type ToolCallbackModifier and TypeMethodDescriptionDefaultToolCallingChatOptions.Builder.toolCallbacks
(ToolCallback... toolCallbacks) ToolCallingChatOptions.Builder.toolCallbacks
(ToolCallback... toolCallbacks) ToolCallbacks to be registered with the ChatModel.Method parameters in org.springframework.ai.model.tool with type arguments of type ToolCallbackModifier and TypeMethodDescriptionstatic List<ToolCallback>
ToolCallingChatOptions.mergeToolCallbacks
(List<ToolCallback> runtimeToolCallbacks, List<ToolCallback> defaultToolCallbacks) void
DefaultToolCallingChatOptions.setToolCallbacks
(List<ToolCallback> toolCallbacks) void
ToolCallingChatOptions.setToolCallbacks
(List<ToolCallback> toolCallbacks) Set the ToolCallbacks to be registered with the ChatModel.DefaultToolCallingChatOptions.Builder.toolCallbacks
(List<ToolCallback> toolCallbacks) ToolCallingChatOptions.Builder.toolCallbacks
(List<ToolCallback> toolCallbacks) ToolCallbacks to be registered with the ChatModel.static void
ToolCallingChatOptions.validateToolCallbacks
(List<ToolCallback> toolCallbacks) -
Uses of ToolCallback in org.springframework.ai.ollama.api
Methods in org.springframework.ai.ollama.api that return types with arguments of type ToolCallbackMethods in org.springframework.ai.ollama.api with parameters of type ToolCallbackModifier and TypeMethodDescriptionOllamaOptions.Builder.toolCallbacks
(ToolCallback... toolCallbacks) Method parameters in org.springframework.ai.ollama.api with type arguments of type ToolCallbackModifier and TypeMethodDescriptionvoid
OllamaOptions.setToolCallbacks
(List<ToolCallback> toolCallbacks) OllamaOptions.Builder.toolCallbacks
(List<ToolCallback> toolCallbacks) -
Uses of ToolCallback in org.springframework.ai.openai
Methods in org.springframework.ai.openai that return types with arguments of type ToolCallbackMethods in org.springframework.ai.openai with parameters of type ToolCallbackModifier and TypeMethodDescriptionOpenAiChatOptions.Builder.toolCallbacks
(ToolCallback... toolCallbacks) Method parameters in org.springframework.ai.openai with type arguments of type ToolCallbackModifier and TypeMethodDescriptionvoid
OpenAiChatOptions.setToolCallbacks
(List<ToolCallback> toolCallbacks) OpenAiChatOptions.Builder.toolCallbacks
(List<ToolCallback> toolCallbacks) -
Uses of ToolCallback in org.springframework.ai.tool
Methods in org.springframework.ai.tool that return ToolCallbackModifier and TypeMethodDescriptionstatic ToolCallback[]
StaticToolCallbackProvider.getToolCallbacks()
Returns the array of function callbacks held by this provider.ToolCallbackProvider.getToolCallbacks()
Methods in org.springframework.ai.tool with parameters of type ToolCallbackModifier and TypeMethodDescriptionstatic ToolCallbackProvider
ToolCallbackProvider.from
(ToolCallback... toolCallbacks) Method parameters in org.springframework.ai.tool with type arguments of type ToolCallbackModifier and TypeMethodDescriptionstatic ToolCallbackProvider
ToolCallbackProvider.from
(List<? extends ToolCallback> toolCallbacks) Constructors in org.springframework.ai.tool with parameters of type ToolCallbackModifierConstructorDescriptionStaticToolCallbackProvider
(ToolCallback... toolCallbacks) Constructs a new StaticToolCallbackProvider with the specified array of function callbacks.Constructor parameters in org.springframework.ai.tool with type arguments of type ToolCallbackModifierConstructorDescriptionStaticToolCallbackProvider
(List<? extends ToolCallback> toolCallbacks) Constructs a new StaticToolCallbackProvider with the specified list of function callbacks. -
Uses of ToolCallback in org.springframework.ai.tool.function
Classes in org.springframework.ai.tool.function that implement ToolCallbackModifier and TypeClassDescriptionclass
FunctionToolCallback<I,
O> AToolCallback
implementation to invoke functions as tools. -
Uses of ToolCallback in org.springframework.ai.tool.method
Classes in org.springframework.ai.tool.method that implement ToolCallbackModifier and TypeClassDescriptionfinal class
AToolCallback
implementation to invoke methods as tools.Methods in org.springframework.ai.tool.method that return ToolCallback -
Uses of ToolCallback in org.springframework.ai.tool.resolution
Methods in org.springframework.ai.tool.resolution that return ToolCallbackConstructor parameters in org.springframework.ai.tool.resolution with type arguments of type ToolCallback -
Uses of ToolCallback in org.springframework.ai.tool.util
Methods in org.springframework.ai.tool.util with parameters of type ToolCallbackMethod parameters in org.springframework.ai.tool.util with type arguments of type ToolCallbackModifier and TypeMethodDescriptionToolUtils.getDuplicateToolNames
(List<ToolCallback> toolCallbacks) -
Uses of ToolCallback in org.springframework.ai.vertexai.gemini
Methods in org.springframework.ai.vertexai.gemini that return types with arguments of type ToolCallbackMethods in org.springframework.ai.vertexai.gemini with parameters of type ToolCallbackModifier and TypeMethodDescriptionVertexAiGeminiChatOptions.Builder.toolCallbacks
(ToolCallback... toolCallbacks) Method parameters in org.springframework.ai.vertexai.gemini with type arguments of type ToolCallbackModifier and TypeMethodDescriptionvoid
VertexAiGeminiChatOptions.setToolCallbacks
(List<ToolCallback> toolCallbacks) VertexAiGeminiChatOptions.Builder.toolCallbacks
(List<ToolCallback> toolCallbacks) -
Uses of ToolCallback in org.springframework.ai.zhipuai
Methods in org.springframework.ai.zhipuai that return types with arguments of type ToolCallbackMethods in org.springframework.ai.zhipuai with parameters of type ToolCallbackModifier and TypeMethodDescriptionZhiPuAiChatOptions.Builder.toolCallbacks
(ToolCallback... toolCallbacks) Method parameters in org.springframework.ai.zhipuai with type arguments of type ToolCallbackModifier and TypeMethodDescriptionvoid
ZhiPuAiChatOptions.setToolCallbacks
(List<ToolCallback> toolCallbacks) ZhiPuAiChatOptions.Builder.toolCallbacks
(List<ToolCallback> toolCallbacks)