Stay organized with collections
Save and categorize content based on your preferences.
Structured representation of a function declaration as defined by the OpenAPI 3.0 specification. Included in this declaration are the function name, description, parameters and response type. 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.
Fields
name
string
Required. 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, dots and dashes, with a maximum length of 64.
description
string
Optional. description and purpose of the function. Model uses it to decide how and whether to call the function.
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. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
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:
Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
Schema is used to define the format of input/output data. Represents a select subset of an OpenAPI 3.0 schema object. More fields may be added in the future as needed.
Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc
Optional. Maximum number of the elements for type.ARRAY.
enum[]
string
Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]}
[[["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-06-27 UTC."],[],[],null,["# FunctionDeclaration\n\nStructured 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, description, parameters and response type. 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.\nFields `name` `string` \nRequired. 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, dots and dashes, with a maximum length of 64.\n`description` `string` \nOptional. description and purpose of the function. Model uses it to decide how and whether to call the function.\n`parameters` `object (`[Schema](/vertex-ai/docs/reference/rest/v1beta1/FunctionDeclaration#Schema)`)` \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. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1\n`parametersJsonSchema` `value (`[Value](https://protobuf.dev/reference/protobuf/google.protobuf/#value)` format)` \nOptional. 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: \n\n {\n \"type\": \"object\",\n \"properties\": {\n \"name\": { \"type\": \"string\" },\n \"age\": { \"type\": \"integer\" }\n },\n \"additionalProperties\": false,\n \"required\": [\"name\", \"age\"],\n \"propertyOrdering\": [\"name\", \"age\"]\n }\n\nThis field is mutually exclusive with `parameters`.\n`response` `object (`[Schema](/vertex-ai/docs/reference/rest/v1beta1/FunctionDeclaration#Schema)`)` \nOptional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.\n`responseJsonSchema` `value (`[Value](https://protobuf.dev/reference/protobuf/google.protobuf/#value)` format)` \nOptional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function.\n\nThis field is mutually exclusive with `response`. \n\nSchema\n------\n\nSchema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed.\nFields `type` `enum (`[Type](/vertex-ai/docs/reference/rest/v1beta1/FunctionDeclaration#Type)`)` \nOptional. The type of the data.\n`format` `string` \nOptional. The format of the data. Supported formats: for NUMBER type: \"float\", \"double\" for INTEGER type: \"int32\", \"int64\" for STRING type: \"email\", \"byte\", etc\n`title` `string` \nOptional. The title of the Schema.\n`description` `string` \nOptional. The description of the data.\n`nullable` `boolean` \nOptional. Indicates if the value may be null.\n`default` `value (`[Value](https://protobuf.dev/reference/protobuf/google.protobuf/#value)` format)` \nOptional. Default value of the data.\n`items` `object (`[Schema](/vertex-ai/docs/reference/rest/v1beta1/FunctionDeclaration#Schema)`)` \nOptional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of type.ARRAY.\n`minItems` `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` \nOptional. Minimum number of the elements for type.ARRAY.\n`maxItems` `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` \nOptional. Maximum number of the elements for type.ARRAY.\n`enum[]` `string` \nOptional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:\\[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"\\]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:\\[\"101\", \"201\", \"301\"\\]}\n`properties` `map (key: string, value: object (`[Schema](/vertex-ai/docs/reference/rest/v1beta1/FunctionDeclaration#Schema)`))` \nOptional. SCHEMA FIELDS FOR TYPE OBJECT Properties of type.OBJECT.\n`propertyOrdering[]` `string` \nOptional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties.\n`required[]` `string` \nOptional. Required properties of type.OBJECT.\n`minProperties` `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` \nOptional. Minimum number of the properties for type.OBJECT.\n`maxProperties` `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` \nOptional. Maximum number of the properties for type.OBJECT.\n`minimum` `number` \nOptional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the type.INTEGER and type.NUMBER\n`maximum` `number` \nOptional. Maximum value of the type.INTEGER and type.NUMBER\n`minLength` `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` \nOptional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the type.STRING\n`maxLength` `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` \nOptional. Maximum length of the type.STRING\n`pattern` `string` \nOptional. Pattern of the type.STRING to restrict a string to a regular expression.\n`example` `value (`[Value](https://protobuf.dev/reference/protobuf/google.protobuf/#value)` format)` \nOptional. Example of the object. Will only populated when the object is the root.\n`anyOf[]` `object (`[Schema](/vertex-ai/docs/reference/rest/v1beta1/FunctionDeclaration#Schema)`)` \nOptional. The value should be validated against any (one or more) of the subschemas in the list.\n`additionalProperties` `value (`[Value](https://protobuf.dev/reference/protobuf/google.protobuf/#value)` format)` \nOptional. Can either be a boolean or an object; controls the presence of additional properties.\n`ref` `string` \nOptional. Allows indirect references between schema nodes. The value should be a valid reference to a child of the root `defs`.\n\nFor example, the following schema defines a reference to a schema node named \"Pet\":\n\ntype: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string\n\nThe value of the \"pet\" property is a reference to the schema node named \"Pet\". See details in \u003chttps://json-schema.org/understanding-json-schema/structuring\u003e\n`defs` `map (key: string, value: object (`[Schema](/vertex-ai/docs/reference/rest/v1beta1/FunctionDeclaration#Schema)`))` \nOptional. A map of definitions for use by `ref` Only allowed at the root of the schema. \n\nType\n----\n\ntype contains the list of OpenAPI data types as defined by \u003chttps://swagger.io/docs/specification/data-models/data-types/\u003e"]]