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 toolCallInput, @Nullable ToolContext toolContext) SyncMcpToolCallback.call(String toolCallInput, @Nullable ToolContext toolContext) ToolContextToMcpMetaConverter.convert(ToolContext toolContext) Convert the givenToolContextto a Mapinvalid input: '<'String, Object> as MCP tool call metadata.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 StringToolCallback.call(String toolInput, @Nullable 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.augment
Methods in org.springframework.ai.tool.augment with parameters of type ToolContextModifier and TypeMethodDescriptionAugmentedToolCallback.call(String toolInput, @Nullable ToolContext tooContext) -
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, @Nullable 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, @Nullable ToolContext, O> function) Build aFunctionToolCallbackfrom aBiFunction.Constructor parameters in org.springframework.ai.tool.function with type arguments of type ToolContextModifierConstructorDescriptionFunctionToolCallback(ToolDefinition toolDefinition, @Nullable ToolMetadata toolMetadata, Type toolInputType, BiFunction<I, @Nullable ToolContext, O> toolFunction, @Nullable 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, @Nullable ToolContext toolContext)