FunctionDeclarationsTool interface
Stay organized with collections
Save and categorize content based on your preferences.
A FunctionDeclarationsTool
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.
Signature:
export interface FunctionDeclarationsTool
Properties
Property |
Type |
Description |
functionDeclarations |
FunctionDeclaration[] |
Optional. 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, the model will generate the final response back to the user. Maximum 64 function declarations can be provided. |
Optional. 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, the model will generate the final response back to the user. Maximum 64 function declarations can be provided.
Signature:
functionDeclarations?: FunctionDeclaration[];
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-17 UTC.
[null,null,["Last updated 2025-07-17 UTC."],[],[],null,["# FunctionDeclarationsTool interface\n\nA `FunctionDeclarationsTool` 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.\n\n**Signature:** \n\n export interface FunctionDeclarationsTool \n\nProperties\n----------\n\n| Property | Type | Description |\n|-------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [functionDeclarations](./ai.functiondeclarationstool.md#functiondeclarationstoolfunctiondeclarations) | [FunctionDeclaration](./ai.functiondeclaration.md#functiondeclaration_interface)\\[\\] | Optional. 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](./ai.functioncall.md#functioncall_interface) in the response. User should provide a [FunctionResponse](./ai.functionresponse.md#functionresponse_interface) for each function call in the next turn. Based on the function responses, the model will generate the final response back to the user. Maximum 64 function declarations can be provided. |\n\nFunctionDeclarationsTool.functionDeclarations\n---------------------------------------------\n\nOptional. 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](./ai.functioncall.md#functioncall_interface) in the response. User should provide a [FunctionResponse](./ai.functionresponse.md#functionresponse_interface) for each function call in the next turn. Based on the function responses, the model will generate the final response back to the user. Maximum 64 function declarations can be provided.\n\n**Signature:** \n\n functionDeclarations?: FunctionDeclaration[];"]]