diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/tools.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/tools.adoc index fe39d6557..d649452b1 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/tools.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/tools.adoc @@ -316,7 +316,7 @@ The `ToolMetadata.Builder` allows you to build a `ToolMetadata` instance and def ---- Method method = ReflectionUtils.findMethod(DateTimeTools.class, "getCurrentDateTime"); ToolCallback toolCallback = MethodToolCallback.builder() - .toolDefinition(ToolDefinition.builder(method) + .toolDefinition(ToolDefinitions.builder(method) .description("Get the current date and time in the user's timezone") .build()) .toolMethod(method) @@ -349,7 +349,7 @@ class DateTimeTools { ---- Method method = ReflectionUtils.findMethod(DateTimeTools.class, "getCurrentDateTime"); ToolCallback toolCallback = MethodToolCallback.builder() - .toolDefinition(ToolDefinition.builder(method) + .toolDefinition(ToolDefinitions.builder(method) .description("Get the current date and time in the user's timezone") .build()) .toolMethod(method) @@ -801,7 +801,7 @@ If you'd rather provide some or all of the attributes explicitly, you can use th [source,java] ---- Method method = ReflectionUtils.findMethod(DateTimeTools.class, "getCurrentDateTime"); -ToolDefinition toolDefinition = ToolDefinition.builder(method) +ToolDefinition toolDefinition = ToolDefinitions.builder(method) .name("currentDateTime") .description("Get the current date and time in the user's timezone") .inputSchema(JsonSchemaGenerator.generateForMethodInput(method))