All Known Implementing Classes:
Tool.CodeExecution, Tool.ComputerUse, Tool.FileSearch, Tool.Function, Tool.GoogleSearch, Tool.McpServer, Tool.UrlContext

Represents a tool definition that the model can use.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Allowed tools configuration.
    static final record 
    Tool definition for Code Execution.
    static final record 
    Tool definition for Computer Use.
    static final record 
    Tool definition for File Search.
    static final record 
    Tool definition for a function.
    static final record 
    Tool definition for Google Search.
    static final record 
    Tool definition for an MCP Server.
    static enum 
    Tool choice mode.
    static final record 
    Configuration for tool choice.
    static final record 
    Tool definition for URL Context.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the type of the tool.
  • Method Details

    • type

      String type()
      Returns the type of the tool.
      Returns:
      The tool type.