Annotation Type Param


@Retention(RUNTIME) @Target(PARAMETER) public @interface Param
Annotation to mark a method parameter marked as a Tool or Prompt parameter within the AI provider framework.

Parameters annotated with @Param are recognized as structured arguments for tool functions or prompts, providing metadata such as the parameter's name, description, and default value.

  • name: Optional parameter name. If not specified, NOT_DEFINED is used as a placeholder.
  • description: Required description of the parameter's purpose and usage.
  • defaultValue: Optional default value for the parameter. If not specified, NOT_DEFINED is used.

The annotation is retained at runtime and applicable to method parameters only.

The constant NULL can be used to indicate a null value for the parameter.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Description of the parameter's purpose and usage.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Optional default value for the parameter.
    Optional parameter name.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Placeholder value indicating that the parameter name or default value is not defined.
    static final String
    Placeholder value indicating a null parameter value.
  • Field Details

    • NULL

      static final String NULL
      Placeholder value indicating a null parameter value.
      See Also:
    • NOT_DEFINED

      static final String NOT_DEFINED
      Placeholder value indicating that the parameter name or default value is not defined.
      See Also:
  • Element Details

    • name

      String name
      Optional parameter name. If not specified, NOT_DEFINED is used.
      Returns:
      the name of the parameter, or NOT_DEFINED if not set
      Default:
      "___NOT_DEFINED___"
    • description

      String description
      Description of the parameter's purpose and usage.
      Returns:
      the parameter description
    • defaultValue

      String defaultValue
      Optional default value for the parameter. If not specified, NOT_DEFINED is used.
      Returns:
      the default value of the parameter, or NOT_DEFINED if not set
      Default:
      "___NOT_DEFINED___"