Interface CopilotToolMetadataProvider<T>

Type Parameters:
T - the tool class whose methods are described by this provider

@CopilotExperimental public interface CopilotToolMetadataProvider<T>
Contract for classes that provide ToolDefinition metadata for @CopilotTool-annotated methods.

The CopilotToolProcessor annotation processor generates an implementation of this interface as a $$CopilotToolMeta companion class. Users may also implement this interface directly for full manual control over tool registration without using annotation processing.

Since:
1.0.2
  • Method Summary

    Modifier and Type
    Method
    Description
    definitions(T instance, com.fasterxml.jackson.databind.ObjectMapper mapper)
    Returns tool definitions for the given instance.
  • Method Details

    • definitions

      List<ToolDefinition> definitions(T instance, com.fasterxml.jackson.databind.ObjectMapper mapper)
      Returns tool definitions for the given instance.
      Parameters:
      instance - the object containing tool methods, or null for static methods
      mapper - the SDK-configured ObjectMapper for argument deserialization
      Returns:
      list of tool definitions with working invocation handlers