Annotation Interface Tool.Annotations

Enclosing class:
Tool

@Target(ANNOTATION_TYPE) @Retention(RUNTIME) public static @interface Tool.Annotations
Nested annotation for tool behavioral hints.

These hints help clients understand the tool's behavior and side effects.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    If true, this tool may perform destructive updates to its environment.
    boolean
    If true, calling the tool repeatedly with the same arguments will have no additional effect on its environment (safe to retry).
    boolean
    If true, this tool may interact with an "open world" of external entities.
    boolean
    If true, this tool only reads data and does not modify its environment.
    A human-readable title for the tool.
  • Element Details

    • title

      String title
      A human-readable title for the tool.
      Returns:
      the tool title
      Default:
      ""
    • readOnlyHint

      boolean readOnlyHint
      If true, this tool only reads data and does not modify its environment.

      Default is false, assuming tools may have side effects.

      Returns:
      true if read-only
      Default:
      false
    • destructiveHint

      boolean destructiveHint
      If true, this tool may perform destructive updates to its environment. If false, the tool performs only additive updates.

      Default is true to err on the side of caution.

      Returns:
      true if potentially destructive
      Default:
      true
    • idempotentHint

      boolean idempotentHint
      If true, calling the tool repeatedly with the same arguments will have no additional effect on its environment (safe to retry).

      Default is false.

      Returns:
      true if idempotent
      Default:
      false
    • openWorldHint

      boolean openWorldHint
      If true, this tool may interact with an "open world" of external entities. If false, the tool's domain of interaction is closed.

      Default is true, assuming tools may interact with external systems.

      Returns:
      true if open world
      Default:
      true