Class Tool
- Namespace
- GenerativeAI.Types
- Assembly
- GenerativeAI.dll
Tool details that the model may use to generate response. A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.
public class Tool
- Inheritance
-
Tool
- Inherited Members
- Extension Methods
Properties
CodeExecution
Optional. Enables the model to execute code as part of generation.
[JsonPropertyName("codeExecution")]
public CodeExecutionTool? CodeExecution { get; set; }
Property Value
ComputerUse
Optional. Tool to support computer use.
[JsonPropertyName("computerUse")]
public ComputerUse? ComputerUse { get; set; }
Property Value
EnterpriseWebSearch
Optional. Tool to search public web data, powered by Vertex AI Search and Sec4 compliance.
[JsonPropertyName("enterpriseWebSearch")]
public EnterpriseWebSearch? EnterpriseWebSearch { get; set; }
Property Value
ExaAiSearch
Web search through Exa AI. Vertex AI only.
[JsonPropertyName("exaAiSearch")]
public ToolExaAiSearch? ExaAiSearch { get; set; }
Property Value
FileSearch
Retrieves relevant content from File Search stores.
[JsonPropertyName("fileSearch")]
public FileSearch? FileSearch { get; set; }
Property Value
FunctionDeclarations
Optional. A list of FunctionDeclarations available to the model that can be used for function calling. The model or system does not execute the function. Instead the defined function may be returned as a FunctionCall with arguments to the client side for execution. The model may decide to call a subset of these functions by populating FunctionCall in the response. The next conversation turn may contain a FunctionResponse with the Role "function" generation context for the next model turn.
[JsonPropertyName("functionDeclarations")]
public List<FunctionDeclaration>? FunctionDeclarations { get; set; }
Property Value
GoogleMaps
Optional. Tool to support Google Maps in Model.
[JsonPropertyName("googleMaps")]
public GoogleMaps? GoogleMaps { get; set; }
Property Value
GoogleSearch
Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
[JsonPropertyName("googleSearch")]
public GoogleSearchTool? GoogleSearch { get; set; }
Property Value
GoogleSearchRetrieval
Optional. Retrieval tool that is powered by Google search.
[JsonPropertyName("googleSearchRetrieval")]
public GoogleSearchRetrievalTool? GoogleSearchRetrieval { get; set; }
Property Value
McpServers
Remote MCP servers that the model calls server-side.
[JsonPropertyName("mcpServers")]
public List<McpServer>? McpServers { get; set; }
Property Value
ParallelAiSearch
Web search through Parallel AI. Vertex AI only.
[JsonPropertyName("parallelAiSearch")]
public ToolParallelAiSearch? ParallelAiSearch { get; set; }
Property Value
Retrieval
Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
[JsonPropertyName("retrieval")]
public VertexRetrievalTool? Retrieval { get; set; }
Property Value
UrlContext
Optional. Tool to support URL context retrieval.
[JsonPropertyName("urlContext")]
public UrlContext? UrlContext { get; set; }