Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a Tool by the model and executed by the client.
Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
name
name:string;
The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a max length of 64.
parameters
parameters?:FunctionDeclarationSchema;
Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset.
Example
with 1 required and 1 optional parameter: type: OBJECT properties:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Interface FunctionDeclaration (1.10.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.10.0 (latest)](/nodejs/docs/reference/vertexai/latest/vertexai/functiondeclaration)\n- [1.9.0](/nodejs/docs/reference/vertexai/1.9.0/vertexai/functiondeclaration)\n- [1.8.1](/nodejs/docs/reference/vertexai/1.8.1/vertexai/functiondeclaration)\n- [1.7.0](/nodejs/docs/reference/vertexai/1.7.0/vertexai/functiondeclaration)\n- [1.6.0](/nodejs/docs/reference/vertexai/1.6.0/vertexai/functiondeclaration)\n- [1.5.0](/nodejs/docs/reference/vertexai/1.5.0/vertexai/functiondeclaration)\n- [1.4.1](/nodejs/docs/reference/vertexai/1.4.1/vertexai/functiondeclaration)\n- [1.3.1](/nodejs/docs/reference/vertexai/1.3.1/vertexai/functiondeclaration)\n- [1.2.0](/nodejs/docs/reference/vertexai/1.2.0/vertexai/functiondeclaration)\n- [1.1.0](/nodejs/docs/reference/vertexai/1.1.0/vertexai/functiondeclaration)\n- [1.0.0](/nodejs/docs/reference/vertexai/1.0.0/vertexai/functiondeclaration)\n- [0.5.0](/nodejs/docs/reference/vertexai/0.5.0/vertexai/functiondeclaration)\n- [0.4.0](/nodejs/docs/reference/vertexai/0.4.0/vertexai/functiondeclaration)\n- [0.3.1](/nodejs/docs/reference/vertexai/0.3.1/vertexai/functiondeclaration)\n- [0.2.1](/nodejs/docs/reference/vertexai/0.2.1/vertexai/functiondeclaration) \nStructured representation of a function declaration as defined by the \\[OpenAPI 3.0 specification\\](\u003chttps://spec.openapis.org/oas/v3.0.3\u003e). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a Tool by the model and executed by the client.\n\nPackage\n-------\n\n[@google-cloud/vertexai](../overview.html)\n\nProperties\n----------\n\n### description\n\n description?: string;\n\nOptional. Description and purpose of the function. Model uses it to decide how and whether to call the function.\n\n### name\n\n name: string;\n\nThe name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a max length of 64.\n\n### parameters\n\n parameters?: FunctionDeclarationSchema;\n\nOptional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset.\n**Example**\n\nwith 1 required and 1 optional parameter: type: OBJECT properties: \n\n\n param1:\n\n type: STRING\n param2:\n\n type: INTEGER\n required:\n\n - param1"]]