Tool details of a tool that the model may use to generate a response.

Properties

codeExecution?: ToolCodeExecution

Optional. CodeExecution tool type. Enables the model to execute code as part of generation.

computerUse?: ComputerUse

Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.

enterpriseWebSearch?: EnterpriseWebSearch

Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance. This field is not supported in Gemini API.

fileSearch?: FileSearch

Optional. Tool to retrieve knowledge from the File Search Stores.

functionDeclarations?: FunctionDeclaration[]

Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.

googleMaps?: GoogleMaps

Optional. Tool that allows grounding the model's response with geospatial context related to the user's query.

googleSearch?: GoogleSearch

Enables the model to execute Google Search as part of generation.

googleSearchRetrieval?: GoogleSearchRetrieval

Optional. Specialized retrieval tool that is powered by Google Search.

mcpServers?: McpServer[]

Optional. MCP Servers to connect to. This field is not supported in Vertex AI.

parallelAiSearch?: ToolParallelAiSearch

Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation. This field is not supported in Gemini API.

retrieval?: 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. This field is not supported in Gemini API.

urlContext?: UrlContext

Optional. Tool to support URL context retrieval.