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. A Tool object should contain exactly one type of Tool.
| JSON representation |
|---|
{ "templateFunctions": [ { object ( |
| Fields | |
|---|---|
templateFunctions[] |
Optional. A list of user-provided functions for function calling. For functions whose names are listed in the template frontmatter, the model may decide to call a subset of these functions by populating |
googleMaps |
Optional. Tool to retrieve public maps data for grounding, powered by Google. |
TemplateFunction
Structured representation of a function declaration as defined by the OpenAPI 3.0 specification. This is a representation of a block of code that can be used as a Tool by the model and executed by the client. The name of the function must be listed in the template frontmatter for the model to be able to call it.
| JSON representation |
|---|
{ "name": string, "inputSchema": { object }, "outputSchema": { object } } |
| Fields | |
|---|---|
name |
Required. The name of the function to call. |
inputSchema |
Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: |
outputSchema |
Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. |
GoogleMaps
Tool to retrieve public maps data for grounding, powered by Google.
| JSON representation |
|---|
{ "enableWidget": boolean } |
| Fields | |
|---|---|
enableWidget |
Optional. If true, include the widget context token in the response. |