Annotation Interface CopilotToolParam


Annotates a parameter of a CopilotTool-annotated method to provide metadata about the parameter that is sent to the model.

Example usage:

@CopilotTool("Search for issues")
public CompletableFuture<String> searchIssues(
                @CopilotToolParam(value = "Search query", required = true) String query,
                @CopilotToolParam(value = "Max results", required = false, defaultValue = "10") int limit) {
        // ...
}
Since:
1.0.2
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Optional default value when the argument is omitted.
    Parameter name override.
    boolean
    Whether this parameter is required.
    Parameter description (sent to the model).
  • Element Details

    • value

      String value
      Parameter description (sent to the model).
      Default:
      ""
    • name

      String name
      Parameter name override. Defaults to the actual parameter name.
      Default:
      ""
    • required

      boolean required
      Whether this parameter is required. Default true.
      Default:
      true
    • defaultValue

      String defaultValue
      Optional default value when the argument is omitted.
      Default:
      ""