Annotation Interface CopilotTool


Marks a method as a Copilot tool. The annotated method will be exposed to the model as a callable tool during a session.

Example usage:

@CopilotTool("Get weather for a location")
public CompletableFuture<String> getWeather(
                @CopilotToolParam(value = "City name", required = true) String location) {
        return CompletableFuture.completedFuture("Sunny in " + location);
}
Since:
1.0.2
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Tool description (sent to the model).
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Defer configuration for this tool.
    Tool name.
    boolean
    Whether this tool overrides a built-in tool.
    boolean
    Whether to skip permission checks.
  • Element Details

    • value

      String value
      Tool description (sent to the model).
    • name

      String name
      Tool name. Defaults to method name converted to snake_case.
      Default:
      ""
    • overridesBuiltInTool

      boolean overridesBuiltInTool
      Whether this tool overrides a built-in tool.
      Default:
      false
    • skipPermission

      boolean skipPermission
      Whether to skip permission checks.
      Default:
      false
    • defer

      ToolDefer defer
      Defer configuration for this tool.
      Default:
      NONE