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 (`https://firebase.google.com/docs/reference/ai-logic/rest/v1beta/Tool#TemplateFunction`) } ], "googleMaps": { object (`https://firebase.google.com/docs/reference/ai-logic/rest/v1beta/Tool#GoogleMaps`) } } ``` |

| Fields ||
|---|---|
| `templateFunctions[]` | ``object (`https://firebase.google.com/docs/reference/ai-logic/rest/v1beta/Tool#TemplateFunction`)`` 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 `FunctionCall` in the response. User should provide a `FunctionResponse` for each function call in the next turn. |
| `googleMaps` | ``object (`https://firebase.google.com/docs/reference/ai-logic/rest/v1beta/Tool#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](https://spec.openapis.org/oas/v3.0.3). 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` | `string` Required. The name of the function to call. |
| `inputSchema` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` 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: { "type": "object", "properties": { "name": { "type": "string" }, "age": { "type": "integer" } }, "additionalProperties": false, "required": ["name", "age"], "propertyOrdering": ["name", "age"] } |
| `outputSchema` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` 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` | `boolean` Optional. If true, include the widget context token in the response. |