Interface ToolDefinition.Builder

  • Method Details

    • name

      The name of the tool. This name identifies the tool in the Model Context Protocol.

      Parameters:
      name - The name of the tool. This name identifies the tool in the Model Context Protocol.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • description

      ToolDefinition.Builder description(String description)

      The description of the tool. This description provides information about the purpose and usage of the tool.

      Parameters:
      description - The description of the tool. This description provides information about the purpose and usage of the tool.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • inputSchema

      ToolDefinition.Builder inputSchema(SchemaDefinition inputSchema)

      The input schema for the tool. This schema defines the structure of the input that the tool accepts.

      Parameters:
      inputSchema - The input schema for the tool. This schema defines the structure of the input that the tool accepts.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • inputSchema

      default ToolDefinition.Builder inputSchema(Consumer<SchemaDefinition.Builder> inputSchema)

      The input schema for the tool. This schema defines the structure of the input that the tool accepts.

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

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

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

      ToolDefinition.Builder outputSchema(SchemaDefinition outputSchema)

      The output schema for the tool. This schema defines the structure of the output that the tool produces.

      Parameters:
      outputSchema - The output schema for the tool. This schema defines the structure of the output that the tool produces.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • outputSchema

      default ToolDefinition.Builder outputSchema(Consumer<SchemaDefinition.Builder> outputSchema)

      The output schema for the tool. This schema defines the structure of the output that the tool produces.

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

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

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