Interface ToolSpec.Builder

All Superinterfaces:
Buildable, CopyableBuilder<ToolSpec.Builder,ToolSpec>, SdkBuilder<ToolSpec.Builder,ToolSpec>, SdkPojo
Enclosing class:
ToolSpec

@Mutable @NotThreadSafe public static interface ToolSpec.Builder extends SdkPojo, CopyableBuilder<ToolSpec.Builder,ToolSpec>
  • Method Details

    • name

      The unique name of the tool that acts will use to invoke it.

      Parameters:
      name - The unique name of the tool that acts will use to invoke it.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • description

      ToolSpec.Builder description(String description)

      A description of what the tool does and how it should be used.

      Parameters:
      description - A description of what the tool does and how it should be used.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • inputSchema

      ToolSpec.Builder inputSchema(ToolInputSchema inputSchema)

      The JSON schema that defines the expected input format for the tool.

      Parameters:
      inputSchema - The JSON schema that defines the expected input format for the tool.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • inputSchema

      default ToolSpec.Builder inputSchema(Consumer<ToolInputSchema.Builder> inputSchema)

      The JSON schema that defines the expected input format for the tool.

      This is a convenience method that creates an instance of the ToolInputSchema.Builder avoiding the need to create one manually via ToolInputSchema.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to inputSchema(ToolInputSchema).

      Parameters:
      inputSchema - a consumer that will call methods on ToolInputSchema.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: