Uses of Class
dev.langchain4j.agent.tool.ToolSpecification
Packages that use ToolSpecification
Package
Description
-
Uses of ToolSpecification in dev.langchain4j.agent.tool
Methods in dev.langchain4j.agent.tool that return ToolSpecificationModifier and TypeMethodDescriptionToolSpecification.Builder.build()Returns aToolSpecificationbuilt from the parameters previously set.static ToolSpecificationToolSpecifications.toolSpecificationFrom(Method method) Returns theToolSpecificationfor the given method annotated with @Tool.Methods in dev.langchain4j.agent.tool that return types with arguments of type ToolSpecificationModifier and TypeMethodDescriptionstatic List<ToolSpecification> ToolSpecifications.toolSpecificationsFrom(Class<?> classWithTools) ReturnsToolSpecifications for all methods annotated with @Toolwithin the specified class.static List<ToolSpecification> ToolSpecifications.toolSpecificationsFrom(Object objectWithTools) ReturnsToolSpecifications for all methods annotated with @Toolwithin the class of the specified object.Method parameters in dev.langchain4j.agent.tool with type arguments of type ToolSpecificationModifier and TypeMethodDescriptionstatic voidToolSpecifications.validateSpecifications(List<ToolSpecification> toolSpecifications) Validates all theToolSpecifications. -
Uses of ToolSpecification in dev.langchain4j.internal
Method parameters in dev.langchain4j.internal with type arguments of type ToolSpecificationModifier and TypeMethodDescriptionstatic voidChatRequestValidationUtils.validate(List<ToolSpecification> toolSpecifications) -
Uses of ToolSpecification in dev.langchain4j.mcp
Method parameters in dev.langchain4j.mcp with type arguments of type ToolSpecificationModifier and TypeMethodDescriptionvoidMcpToolProvider.addFilter(BiPredicate<McpClient, ToolSpecification> filter) Adds a tools filter that will act in conjunction (AND) with the eventually existing ones.McpToolProvider.Builder.filter(BiPredicate<McpClient, ToolSpecification> mcpToolsFilter) The predicate to filter MCP provided tools.protected ToolProviderResultMcpToolProvider.provideTools(ToolProviderRequest request, BiPredicate<McpClient, ToolSpecification> mcpToolsFilter) voidMcpToolProvider.setFilter(BiPredicate<McpClient, ToolSpecification> filter) Sets the tools filter overriding the eventually existing ones.voidMcpToolProvider.setToolNameMapper(BiFunction<McpClient, ToolSpecification, String> toolNameMapper) Sets the tool name mapper overriding the current one.voidMcpToolProvider.setToolSpecificationMapper(BiFunction<McpClient, ToolSpecification, ToolSpecification> toolSpecificationMapper) Sets the tool specification mapper overriding the current one.voidMcpToolProvider.setToolSpecificationMapper(BiFunction<McpClient, ToolSpecification, ToolSpecification> toolSpecificationMapper) Sets the tool specification mapper overriding the current one.McpToolProvider.Builder.toolNameMapper(BiFunction<McpClient, ToolSpecification, String> toolNameMapper) Defines a mapping function to customize the tool names as they are registered in the tool provider.McpToolProvider.Builder.toolSpecificationMapper(BiFunction<McpClient, ToolSpecification, ToolSpecification> toolSpecificationMapper) Defines a mapping function to customize the tool specifications as they are registered in the tool provider.McpToolProvider.Builder.toolSpecificationMapper(BiFunction<McpClient, ToolSpecification, ToolSpecification> toolSpecificationMapper) Defines a mapping function to customize the tool specifications as they are registered in the tool provider.Constructor parameters in dev.langchain4j.mcp with type arguments of type ToolSpecificationModifierConstructorDescriptionprotectedMcpToolProvider(List<McpClient> mcpClients, boolean failIfOneServerFails, BiPredicate<McpClient, ToolSpecification> mcpToolsFilter, Function<ToolExecutor, ToolExecutor> toolWrapper, McpResourcesAsToolsPresenter resourcesAsToolsPresenter, BiFunction<McpClient, ToolSpecification, String> toolNameMapper, BiFunction<McpClient, ToolSpecification, ToolSpecification> toolSpecificationMapper) protectedMcpToolProvider(List<McpClient> mcpClients, boolean failIfOneServerFails, BiPredicate<McpClient, ToolSpecification> mcpToolsFilter, Function<ToolExecutor, ToolExecutor> toolWrapper, McpResourcesAsToolsPresenter resourcesAsToolsPresenter, BiFunction<McpClient, ToolSpecification, String> toolNameMapper, BiFunction<McpClient, ToolSpecification, ToolSpecification> toolSpecificationMapper) -
Uses of ToolSpecification in dev.langchain4j.mcp.client
Methods in dev.langchain4j.mcp.client that return types with arguments of type ToolSpecification -
Uses of ToolSpecification in dev.langchain4j.mcp.resourcesastools
Methods in dev.langchain4j.mcp.resourcesastools that return ToolSpecificationModifier and TypeMethodDescriptionDefaultMcpResourcesAsToolsPresenter.createGetResourceSpecification()McpResourcesAsToolsPresenter.createGetResourceSpecification()Create a specification for the tool that gets a particular resource.DefaultMcpResourcesAsToolsPresenter.createListResourcesSpecification()McpResourcesAsToolsPresenter.createListResourcesSpecification()Create a specification for the tool that lists available resources. -
Uses of ToolSpecification in dev.langchain4j.model.anthropic
Methods in dev.langchain4j.model.anthropic with parameters of type ToolSpecificationModifier and TypeMethodDescriptionAnthropicChatModel.AnthropicChatModelBuilder.toolSpecifications(ToolSpecification... toolSpecifications) AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.toolSpecifications(ToolSpecification... toolSpecifications) Method parameters in dev.langchain4j.model.anthropic with type arguments of type ToolSpecificationModifier and TypeMethodDescriptionAnthropicChatModel.AnthropicChatModelBuilder.toolSpecifications(List<ToolSpecification> toolSpecifications) AnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.toolSpecifications(List<ToolSpecification> toolSpecifications) -
Uses of ToolSpecification in dev.langchain4j.model.anthropic.internal.mapper
Methods in dev.langchain4j.model.anthropic.internal.mapper with parameters of type ToolSpecificationModifier and TypeMethodDescriptionstatic AnthropicToolAnthropicMapper.toAnthropicTool(ToolSpecification toolSpecification, AnthropicCacheType cacheToolsPrompt) Method parameters in dev.langchain4j.model.anthropic.internal.mapper with type arguments of type ToolSpecificationModifier and TypeMethodDescriptionstatic List<AnthropicTool> AnthropicMapper.toAnthropicTools(List<ToolSpecification> toolSpecifications, AnthropicCacheType cacheToolsPrompt) -
Uses of ToolSpecification in dev.langchain4j.model.chat.request
Methods in dev.langchain4j.model.chat.request that return types with arguments of type ToolSpecificationModifier and TypeMethodDescriptionChatRequest.toolSpecifications()ChatRequestParameters.toolSpecifications()DefaultChatRequestParameters.toolSpecifications()Methods in dev.langchain4j.model.chat.request with parameters of type ToolSpecificationModifier and TypeMethodDescriptionChatRequest.Builder.toolSpecifications(ToolSpecification... toolSpecifications) DefaultChatRequestParameters.Builder.toolSpecifications(ToolSpecification... toolSpecifications) Method parameters in dev.langchain4j.model.chat.request with type arguments of type ToolSpecificationModifier and TypeMethodDescriptionChatRequest.Builder.toolSpecifications(List<ToolSpecification> toolSpecifications) DefaultChatRequestParameters.Builder.toolSpecifications(List<ToolSpecification> toolSpecifications) -
Uses of ToolSpecification in dev.langchain4j.model.googleai
Method parameters in dev.langchain4j.model.googleai with type arguments of type ToolSpecificationModifier and TypeMethodDescriptionintGoogleAiGeminiTokenCountEstimator.estimateTokenCountInToolSpecifications(Iterable<ToolSpecification> toolSpecifications) -
Uses of ToolSpecification in dev.langchain4j.model.mistralai.internal.mapper
Method parameters in dev.langchain4j.model.mistralai.internal.mapper with type arguments of type ToolSpecificationModifier and TypeMethodDescriptionstatic List<MistralAiTool> MistralAiMapper.toMistralAiTools(List<ToolSpecification> toolSpecifications) -
Uses of ToolSpecification in dev.langchain4j.model.openai.internal
Method parameters in dev.langchain4j.model.openai.internal with type arguments of type ToolSpecificationModifier and TypeMethodDescriptionOpenAiUtils.toFunctions(Collection<ToolSpecification> toolSpecifications) Deprecated.OpenAiUtils.toTools(Collection<ToolSpecification> toolSpecifications, boolean strict) -
Uses of ToolSpecification in dev.langchain4j.service
Methods in dev.langchain4j.service that return types with arguments of type ToolSpecificationMethod parameters in dev.langchain4j.service with type arguments of type ToolSpecificationModifier and TypeMethodDescriptionAiServices.tools(Map<ToolSpecification, ToolExecutor> tools) Configures the tools that the LLM can use.AiServiceTokenStreamParameters.Builder.toolSpecifications(List<ToolSpecification> toolSpecifications) Sets the tool specifications. -
Uses of ToolSpecification in dev.langchain4j.service.tool
Methods in dev.langchain4j.service.tool that return ToolSpecificationMethods in dev.langchain4j.service.tool that return types with arguments of type ToolSpecificationModifier and TypeMethodDescriptionToolProviderResult.tools()ToolService.toolSpecifications()ToolServiceContext.toolSpecifications()Methods in dev.langchain4j.service.tool with parameters of type ToolSpecificationModifier and TypeMethodDescriptionToolProviderResult.Builder.add(ToolSpecification tool, ToolExecutor executor) Method parameters in dev.langchain4j.service.tool with type arguments of type ToolSpecificationModifier and TypeMethodDescriptionToolProviderResult.Builder.addAll(Map<ToolSpecification, ToolExecutor> tools) voidToolService.tools(Map<ToolSpecification, ToolExecutor> tools) Constructor parameters in dev.langchain4j.service.tool with type arguments of type ToolSpecificationModifierConstructorDescriptionToolServiceContext(List<ToolSpecification> toolSpecifications, Map<String, ToolExecutor> toolExecutors)
OpenAiUtils.toTools(Collection, boolean)instead