Stay organized with collections
Save and categorize content based on your preferences.
A helper tool that the model may use when generating responses.
Summary
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.
Constructors and Destructors
|
Tool(params FunctionDeclaration[] functionDeclarations)
Creates a tool that allows the model to perform function calling.
|
Tool(IEnumerable< FunctionDeclaration > functionDeclarations)
Creates a tool that allows the model to perform function calling.
|
Tool(GoogleSearch googleSearch)
Creates a tool that allows the model to use Grounding with Google Search.
|
Public functions
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-24 UTC.
[null,null,["Last updated 2025-07-24 UTC."],[],[],null,["# Firebase.AI.Tool Struct Reference\n\nFirebase.AI.Tool\n================\n\nA helper tool that the model may use when generating responses.\n\nSummary\n-------\n\nA [Tool](/docs/reference/unity/struct/firebase/a-i/tool#struct_firebase_1_1_a_i_1_1_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.\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Tool](#struct_firebase_1_1_a_i_1_1_tool_1af0704d27cdf64529504943499473939c)`(params `[FunctionDeclaration](/docs/reference/unity/struct/firebase/a-i/function-declaration#struct_firebase_1_1_a_i_1_1_function_declaration)`[] functionDeclarations)` Creates a tool that allows the model to perform function calling. ||\n| [Tool](#struct_firebase_1_1_a_i_1_1_tool_1a940acfb6a5cf54df9100a9056f8ba324)`(IEnumerable\u003c `[FunctionDeclaration](/docs/reference/unity/struct/firebase/a-i/function-declaration#struct_firebase_1_1_a_i_1_1_function_declaration)` \u003e functionDeclarations)` Creates a tool that allows the model to perform function calling. ||\n| [Tool](#struct_firebase_1_1_a_i_1_1_tool_1a74a37395f428b3091e2b3fbe4e9f74fc)`(`[GoogleSearch](/docs/reference/unity/struct/firebase/a-i/google-search#struct_firebase_1_1_a_i_1_1_google_search)` googleSearch)` Creates a tool that allows the model to use Grounding with Google Search. ||\n\nPublic functions\n----------------\n\n### Tool\n\n```c#\n Firebase::AI::Tool::Tool(\n params FunctionDeclaration[] functionDeclarations\n)\n``` \nCreates a tool that allows the model to perform function calling.\n\n\u003cbr /\u003e\n\n| Details ||\n|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |------------------------|------------------------------------------------------------------------------------------------| | `functionDeclarations` | A list of `FunctionDeclarations` available to the model that can be used for function calling. | |\n\n### Tool\n\n```c#\n Firebase::AI::Tool::Tool(\n IEnumerable\u003c FunctionDeclaration \u003e functionDeclarations\n)\n``` \nCreates a tool that allows the model to perform function calling.\n\n\u003cbr /\u003e\n\n| Details ||\n|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |------------------------|------------------------------------------------------------------------------------------------| | `functionDeclarations` | A list of `FunctionDeclarations` available to the model that can be used for function calling. | |\n\n### Tool\n\n```c#\n Firebase::AI::Tool::Tool(\n GoogleSearch googleSearch\n)\n``` \nCreates a tool that allows the model to use Grounding with Google Search.\n\n\u003cbr /\u003e\n\n| Details ||\n|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `googleSearch` | An empty [GoogleSearch](/docs/reference/unity/struct/firebase/a-i/google-search#struct_firebase_1_1_a_i_1_1_google_search) object. The presence of this object in the list of tools enables the model to use Google Search. | |"]]