Uses of Class
org.springframework.ai.chat.model.ToolContext
Packages that use ToolContext
Package
Description
Core support for Model Context Protocol (MCP) integration in Spring AI.
-
Uses of ToolContext in org.springframework.ai.mcp
Methods in org.springframework.ai.mcp with parameters of type ToolContextModifier and TypeMethodDescriptionAsyncMcpToolCallback.call
(String toolArguments, ToolContext toolContext) SyncMcpToolCallback.call
(String toolArguments, ToolContext toolContext) static Optional<io.modelcontextprotocol.server.McpSyncServerExchange>
McpToolUtils.getMcpExchange
(ToolContext toolContext) Retrieves the MCP exchange object from the provided tool context if it exists. -
Uses of ToolContext in org.springframework.ai.tool
Methods in org.springframework.ai.tool with parameters of type ToolContextModifier and TypeMethodDescriptiondefault String
ToolCallback.call
(String toolInput, ToolContext toolContext) Execute tool with the given input and context, and return the result to send back to the AI model. -
Uses of ToolContext in org.springframework.ai.tool.function
Methods in org.springframework.ai.tool.function with parameters of type ToolContextModifier and TypeMethodDescriptionFunctionToolCallback.call
(String toolInput, ToolContext toolContext) Method parameters in org.springframework.ai.tool.function with type arguments of type ToolContextModifier and TypeMethodDescriptionstatic <I,
O> FunctionToolCallback.Builder<I, O> FunctionToolCallback.builder
(String name, BiFunction<I, ToolContext, O> function) Build aFunctionToolCallback
from aBiFunction
.Constructor parameters in org.springframework.ai.tool.function with type arguments of type ToolContextModifierConstructorDescriptionFunctionToolCallback
(ToolDefinition toolDefinition, ToolMetadata toolMetadata, Type toolInputType, BiFunction<I, ToolContext, O> toolFunction, ToolCallResultConverter toolCallResultConverter) -
Uses of ToolContext in org.springframework.ai.tool.method
Methods in org.springframework.ai.tool.method with parameters of type ToolContextModifier and TypeMethodDescriptionMethodToolCallback.call
(String toolInput, ToolContext toolContext)