Annotation Interface AgentTool


@Target(METHOD) @Retention(RUNTIME) @Documented public @interface AgentTool
Exposes the annotated method as an agent-callable tool (e.g. for Cockroach Aegis or any MCP client). Only @AgentTool methods are exposed, and destructive() tools are hidden unless the caller explicitly opts in — least privilege by default.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The tool name exposed to agents (MCP tool name).
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Human-readable description surfaced in the tool listing.
    boolean
    Whether this tool mutates state; hidden unless destructive tools are allowed.
  • Element Details

    • value

      String value
      The tool name exposed to agents (MCP tool name).
    • description

      String description
      Human-readable description surfaced in the tool listing.
      Default:
      ""
    • destructive

      boolean destructive
      Whether this tool mutates state; hidden unless destructive tools are allowed.
      Default:
      false