MCP Tools Reference: aiplatform.googleapis.com

Tool: list_tuning_jobs

Lists all GenAI tuning jobs within a specified Google Cloud location. Tuning jobs are used to adapt base models (like Gemini) to perform better on specific tasks by training them on user-provided datasets. Use this tool to monitor the status and progress of various fine-tuning efforts in your project. Format: 'projects/{project_id}/locations/{region}'. CRITICAL: For {region}, use the region specified in the current context window. If no region is specified, prompt the user to provide one. Do not use 'global'.

The following sample demonstrate how to use curl to invoke the list_tuning_jobs MCP tool.

Curl Request
  
curl  
--location  
 'https://aiplatform.googleapis.com/mcp/generate' 
  
 \ 
--header  
 'content-type: application/json' 
  
 \ 
--header  
 'accept: application/json, text/event-stream' 
  
 \ 
--data  
 '{ 
 "method": "tools/call", 
 "params": { 
 "name": "list_tuning_jobs", 
 "arguments": { 
 // provide these details according to the tool' 
s  
MCP  
specification  
 } 
  
 } 
,  
 "jsonrpc" 
:  
 "2.0" 
,  
 "id" 
:  
 1 
 } 
 ' 
  

Input Schema

Request message for GenAiTuningService.ListTuningJobs .

ListTuningJobsRequest

JSON representation
 { 
 "parent" 
 : 
 string 
 , 
 "filter" 
 : 
 string 
 , 
 "pageSize" 
 : 
 integer 
 , 
 "pageToken" 
 : 
 string 
 } 
Fields
parent

string

Required. The resource name of the location to list the tuning jobs from. Format: projects/{project}/locations/{location}

filter

string

Optional. The standard list filter.

pageSize

integer

Optional. The standard list page size.

pageToken

string

Optional. The standard list page token.

Typically obtained from ListTuningJobsResponse.next_page_token of the previous GenAiTuningService.ListTuningJobs call.

Output Schema

Response message for GenAiTuningService.ListTuningJobs

ListTuningJobsResponse

JSON representation
 { 
 "tuningJobs" 
 : 
 [ 
 { 
 object (  TuningJob 
 
) 
 } 
 ] 
 , 
 "nextPageToken" 
 : 
 string 
 } 
Fields
tuningJobs[]

object ( TuningJob )

The tuning jobs that match the request.

nextPageToken

string

A token to retrieve the next page of results.

Pass this token in a subsequent [GenAiTuningService.ListTuningJobs] call to retrieve the next page of results.

TuningJob

JSON representation
 { 
 "name" 
 : 
 string 
 , 
 "tunedModelDisplayName" 
 : 
 string 
 , 
 "description" 
 : 
 string 
 , 
 "state" 
 : 
 enum ( JobState 
) 
 , 
 "createTime" 
 : 
 string 
 , 
 "startTime" 
 : 
 string 
 , 
 "endTime" 
 : 
 string 
 , 
 "updateTime" 
 : 
 string 
 , 
 "error" 
 : 
 { 
 object (  Status 
 
) 
 } 
 , 
 "labels" 
 : 
 { 
 string 
 : 
 string 
 , 
 ... 
 } 
 , 
 "experiment" 
 : 
 string 
 , 
 "tunedModel" 
 : 
 { 
 object (  TunedModel 
 
) 
 } 
 , 
 "tuningDataStats" 
 : 
 { 
 object (  TuningDataStats 
 
) 
 } 
 , 
 "encryptionSpec" 
 : 
 { 
 object (  EncryptionSpec 
 
) 
 } 
 , 
 "serviceAccount" 
 : 
 string 
 , 
 // Union field source_model 
can be only one of the following: 
 "baseModel" 
 : 
 string 
 , 
 "preTunedModel" 
 : 
 { 
 object (  PreTunedModel 
 
) 
 } 
 // End of list of possible types for union field source_model 
. 
 // Union field tuning_spec 
can be only one of the following: 
 "supervisedTuningSpec" 
 : 
 { 
 object (  SupervisedTuningSpec 
 
) 
 } 
 // End of list of possible types for union field tuning_spec 
. 
 } 
Fields
name

string

Output only. Identifier. Resource name of a TuningJob. Format: projects/{project}/locations/{location}/tuningJobs/{tuning_job}

tunedModelDisplayName

string

Optional. The display name of the TunedModel . The name can be up to 128 characters long and can consist of any UTF-8 characters. For continuous tuning, tuned_model_display_name will by default use the same display name as the pre-tuned model. If a new display name is provided, the tuning job will create a new model instead of a new version.

description

string

Optional. The description of the TuningJob .

state

enum ( JobState )

Output only. The detailed state of the job.

createTime

string ( Timestamp format)

Output only. Time when the TuningJob was created.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z" , "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30" .

startTime

string ( Timestamp format)

Output only. Time when the TuningJob for the first time entered the JOB_STATE_RUNNING state.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z" , "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30" .

endTime

string ( Timestamp format)

Output only. Time when the TuningJob entered any of the following JobStates : JOB_STATE_SUCCEEDED , JOB_STATE_FAILED , JOB_STATE_CANCELLED , JOB_STATE_EXPIRED .

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z" , "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30" .

updateTime

string ( Timestamp format)

Output only. Time when the TuningJob was most recently updated.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z" , "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30" .

error

object ( Status )

Output only. Only populated when job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED .

labels

map (key: string, value: string)

Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint .

Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed.

See https://goo.gl/xmQnxf for more information and examples of labels.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } .

experiment

string

Output only. The Experiment associated with this TuningJob .

tunedModel

object ( TunedModel )

Output only. The tuned model resources associated with this TuningJob .

tuningDataStats

object ( TuningDataStats )

Output only. The tuning data statistics associated with this TuningJob .

encryptionSpec

object ( EncryptionSpec )

Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with the provided encryption key.

serviceAccount

string

The service account that the tuningJob workload runs as. If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent

Users starting the pipeline must have the iam.serviceAccounts.actAs permission on this service account.

Union field source_model .

source_model can be only one of the following:

baseModel

string

The base model that is being tuned. See Supported models .

preTunedModel

object ( PreTunedModel )

The pre-tuned model for continuous tuning.

Union field tuning_spec .

tuning_spec can be only one of the following:

supervisedTuningSpec

object ( SupervisedTuningSpec )

Tuning Spec for Supervised Fine Tuning.

PreTunedModel

JSON representation
 { 
 "tunedModelName" 
 : 
 string 
 , 
 "checkpointId" 
 : 
 string 
 , 
 "baseModel" 
 : 
 string 
 } 
Fields
tunedModelName

string

The resource name of the Model. E.g., a model resource name with a specified version id or alias:

projects/{project}/locations/{location}/models/{model}@{version_id}

projects/{project}/locations/{location}/models/{model}@{alias}

Or, omit the version id to use the default version:

projects/{project}/locations/{location}/models/{model}

checkpointId

string

Optional. The source checkpoint id. If not specified, the default checkpoint will be used.

baseModel

string

Output only. The name of the base model this PreTunedModel was tuned from.

SupervisedTuningSpec

JSON representation
 { 
 "trainingDatasetUri" 
 : 
 string 
 , 
 "validationDatasetUri" 
 : 
 string 
 , 
 "hyperParameters" 
 : 
 { 
 object (  SupervisedHyperParameters 
 
) 
 } 
 , 
 "exportLastCheckpointOnly" 
 : 
 boolean 
 } 
Fields
trainingDatasetUri

string

Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.

validationDatasetUri

string

Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.

hyperParameters

object ( SupervisedHyperParameters )

Optional. Hyperparameters for SFT.

exportLastCheckpointOnly

boolean

Optional. If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for SFT. Default is false.

SupervisedHyperParameters

JSON representation
 { 
 "epochCount" 
 : 
 string 
 , 
 "learningRateMultiplier" 
 : 
 number 
 , 
 "adapterSize" 
 : 
 enum ( AdapterSize 
) 
 } 
Fields
epochCount

string ( int64 format)

Optional. Number of complete passes the model makes over the entire training dataset during training.

learningRateMultiplier

number

Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with learning_rate . This feature is only available for 1P models.

adapterSize

enum ( AdapterSize )

Optional. Adapter size for tuning.

Timestamp

JSON representation
 { 
 "seconds" 
 : 
 string 
 , 
 "nanos" 
 : 
 integer 
 } 
Fields
seconds

string ( int64 format)

Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).

nanos

integer

Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive.

Status

JSON representation
 { 
 "code" 
 : 
 integer 
 , 
 "message" 
 : 
 string 
 , 
 "details" 
 : 
 [ 
 { 
 "@type" 
 : 
 string 
 , 
 field1 
 : 
 ... 
 , 
 ... 
 } 
 ] 
 } 
Fields
code

integer

The status code, which should be an enum value of google.rpc.Code .

message

string

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.

details[]

object

A list of messages that carry the error details. There is a common set of message types for APIs to use.

An object containing fields of an arbitrary type. An additional field "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" } .

Any

JSON representation
 { 
 "typeUrl" 
 : 
 string 
 , 
 "value" 
 : 
 string 
 } 
Fields
typeUrl

string

Identifies the type of the serialized Protobuf message with a URI reference consisting of a prefix ending in a slash and the fully-qualified type name.

Example: type.googleapis.com/google.protobuf.StringValue

This string must contain at least one / character, and the content after the last / must be the fully-qualified name of the type in canonical form, without a leading dot. Do not write a scheme on these URI references so that clients do not attempt to contact them.

The prefix is arbitrary and Protobuf implementations are expected to simply strip off everything up to and including the last / to identify the type. type.googleapis.com/ is a common default prefix that some legacy implementations require. This prefix does not indicate the origin of the type, and URIs containing it are not expected to respond to any requests.

All type URL strings must be legal URI references with the additional restriction (for the text format) that the content of the reference must consist only of alphanumeric characters, percent-encoded escapes, and characters in the following set (not including the outer backticks): /-.~_!$&()*+,;= . Despite our allowing percent encodings, implementations should not unescape them to prevent confusion with existing parsers. For example, type.googleapis.com%2FFoo should be rejected.

In the original design of Any , the possibility of launching a type resolution service at these type URLs was considered but Protobuf never implemented one and considers contacting these URLs to be problematic and a potential security issue. Do not attempt to contact type URLs.

value

string ( bytes format)

Holds a Protobuf serialization of the type described by type_url.

A base64-encoded string.

LabelsEntry

JSON representation
 { 
 "key" 
 : 
 string 
 , 
 "value" 
 : 
 string 
 } 
Fields
key

string

value

string

TunedModel

JSON representation
 { 
 "model" 
 : 
 string 
 , 
 "endpoint" 
 : 
 string 
 , 
 "checkpoints" 
 : 
 [ 
 { 
 object (  TunedModelCheckpoint 
 
) 
 } 
 ] 
 } 
Fields
model

string

Output only. The resource name of the TunedModel. Format:

projects/{project}/locations/{location}/models/{model}@{version_id}

When tuning from a base model, the version ID will be 1.

For continuous tuning, if the provided tuned_model_display_name is set and different from parent model's display name, the tuned model will have a new parent model with version 1. Otherwise the version id will be incremented by 1 from the last version ID in the parent model. E.g.,

projects/{project}/locations/{location}/models/{model}@{last_version_id + 1}

endpoint

string

Output only. A resource name of an Endpoint. Format: projects/{project}/locations/{location}/endpoints/{endpoint} .

checkpoints[]

object ( TunedModelCheckpoint )

Output only. The checkpoints associated with this TunedModel. This field is only populated for tuning jobs that enable intermediate checkpoints.

TunedModelCheckpoint

JSON representation
 { 
 "checkpointId" 
 : 
 string 
 , 
 "epoch" 
 : 
 string 
 , 
 "step" 
 : 
 string 
 , 
 "endpoint" 
 : 
 string 
 } 
Fields
checkpointId

string

The ID of the checkpoint.

epoch

string ( int64 format)

The epoch of the checkpoint.

step

string ( int64 format)

The step of the checkpoint.

endpoint

string

The Endpoint resource name that the checkpoint is deployed to. Format: projects/{project}/locations/{location}/endpoints/{endpoint} .

TuningDataStats

JSON representation
 { 
 // Union field tuning_data_stats 
can be only one of the following: 
 "supervisedTuningDataStats" 
 : 
 { 
 object (  SupervisedTuningDataStats 
 
) 
 } 
 // End of list of possible types for union field tuning_data_stats 
. 
 } 
Fields

Union field tuning_data_stats .

tuning_data_stats can be only one of the following:

supervisedTuningDataStats

object ( SupervisedTuningDataStats )

The SFT Tuning data stats.

SupervisedTuningDataStats

JSON representation
 { 
 "tuningDatasetExampleCount" 
 : 
 string 
 , 
 "totalTuningCharacterCount" 
 : 
 string 
 , 
 "totalBillableCharacterCount" 
 : 
 string 
 , 
 "totalBillableTokenCount" 
 : 
 string 
 , 
 "tuningStepCount" 
 : 
 string 
 , 
 "userInputTokenDistribution" 
 : 
 { 
 object (  SupervisedTuningDatasetDistribution 
 
) 
 } 
 , 
 "userOutputTokenDistribution" 
 : 
 { 
 object (  SupervisedTuningDatasetDistribution 
 
) 
 } 
 , 
 "userMessagePerExampleDistribution" 
 : 
 { 
 object (  SupervisedTuningDatasetDistribution 
 
) 
 } 
 , 
 "userDatasetExamples" 
 : 
 [ 
 { 
 object (  Content 
 
) 
 } 
 ] 
 , 
 "totalTruncatedExampleCount" 
 : 
 string 
 , 
 "truncatedExampleIndices" 
 : 
 [ 
 string 
 ] 
 , 
 "droppedExampleReasons" 
 : 
 [ 
 string 
 ] 
 } 
Fields
tuningDatasetExampleCount

string ( int64 format)

Output only. Number of examples in the tuning dataset.

totalTuningCharacterCount

string ( int64 format)

Output only. Number of tuning characters in the tuning dataset.

totalBillableCharacterCount
(deprecated)

string ( int64 format)

Output only. Number of billable characters in the tuning dataset.

totalBillableTokenCount

string ( int64 format)

Output only. Number of billable tokens in the tuning dataset.

tuningStepCount

string ( int64 format)

Output only. Number of tuning steps for this Tuning Job.

userInputTokenDistribution

object ( SupervisedTuningDatasetDistribution )

Output only. Dataset distributions for the user input tokens.

userOutputTokenDistribution

object ( SupervisedTuningDatasetDistribution )

Output only. Dataset distributions for the user output tokens.

userMessagePerExampleDistribution

object ( SupervisedTuningDatasetDistribution )

Output only. Dataset distributions for the messages per example.

userDatasetExamples[]

object ( Content )

Output only. Sample user messages in the training dataset uri.

totalTruncatedExampleCount

string ( int64 format)

Output only. The number of examples in the dataset that have been dropped. An example can be dropped for reasons including: too many tokens, contains an invalid image, contains too many images, etc.

truncatedExampleIndices[]

string ( int64 format)

Output only. A partial sample of the indices (starting from 1) of the dropped examples.

droppedExampleReasons[]

string

Output only. For each index in truncated_example_indices , the user-facing reason why the example was dropped.

SupervisedTuningDatasetDistribution

JSON representation
 { 
 "sum" 
 : 
 string 
 , 
 "billableSum" 
 : 
 string 
 , 
 "min" 
 : 
 number 
 , 
 "max" 
 : 
 number 
 , 
 "mean" 
 : 
 number 
 , 
 "median" 
 : 
 number 
 , 
 "p5" 
 : 
 number 
 , 
 "p95" 
 : 
 number 
 , 
 "buckets" 
 : 
 [ 
 { 
 object (  DatasetBucket 
 
) 
 } 
 ] 
 } 
Fields
sum

string ( int64 format)

Output only. Sum of a given population of values.

billableSum

string ( int64 format)

Output only. Sum of a given population of values that are billable.

min

number

Output only. The minimum of the population values.

max

number

Output only. The maximum of the population values.

mean

number

Output only. The arithmetic mean of the values in the population.

median

number

Output only. The median of the values in the population.

p5

number

Output only. The 5th percentile of the values in the population.

p95

number

Output only. The 95th percentile of the values in the population.

buckets[]

object ( DatasetBucket )

Output only. Defines the histogram bucket.

DatasetBucket

JSON representation
 { 
 "count" 
 : 
 number 
 , 
 "left" 
 : 
 number 
 , 
 "right" 
 : 
 number 
 } 
Fields
count

number

Output only. Number of values in the bucket.

left

number

Output only. Left bound of the bucket.

right

number

Output only. Right bound of the bucket.

Content

JSON representation
 { 
 "role" 
 : 
 string 
 , 
 "parts" 
 : 
 [ 
 { 
 object (  Part 
 
) 
 } 
 ] 
 } 
Fields
role

string

Optional. The producer of the content. Must be either 'user' or 'model'.

If not set, the service will default to 'user'.

parts[]

object ( Part )

Required. A list of Part objects that make up a single message. Parts of a message can have different MIME types.

A Content message must have at least one Part .

Part

JSON representation
 { 
 "thought" 
 : 
 boolean 
 , 
 "thoughtSignature" 
 : 
 string 
 , 
 "mediaResolution" 
 : 
 { 
 object (  MediaResolution 
 
) 
 } 
 , 
 // Union field data 
can be only one of the following: 
 "text" 
 : 
 string 
 , 
 "inlineData" 
 : 
 { 
 object (  Blob 
 
) 
 } 
 , 
 "fileData" 
 : 
 { 
 object (  FileData 
 
) 
 } 
 , 
 "functionCall" 
 : 
 { 
 object (  FunctionCall 
 
) 
 } 
 , 
 "functionResponse" 
 : 
 { 
 object (  FunctionResponse 
 
) 
 } 
 , 
 "executableCode" 
 : 
 { 
 object (  ExecutableCode 
 
) 
 } 
 , 
 "codeExecutionResult" 
 : 
 { 
 object (  CodeExecutionResult 
 
) 
 } 
 // End of list of possible types for union field data 
. 
 // Union field metadata 
can be only one of the following: 
 "videoMetadata" 
 : 
 { 
 object (  VideoMetadata 
 
) 
 } 
 // End of list of possible types for union field metadata 
. 
 } 
Fields
thought

boolean

Optional. Indicates whether the part represents the model's thought process or reasoning.

thoughtSignature

string ( bytes format)

Optional. An opaque signature for the thought so it can be reused in subsequent requests.

A base64-encoded string.

mediaResolution

object ( MediaResolution )

per part media resolution. Media resolution for the input media.

Union field data .

data can be only one of the following:

text

string

Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example @my-repo will be converted to and sent as **my-repo** by the IDE agent.

inlineData

object ( Blob )

Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.

fileData

object ( FileData )

Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.

functionCall

object ( FunctionCall )

Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.

functionResponse

object ( FunctionResponse )

Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.

executableCode

object ( ExecutableCode )

Optional. Code generated by the model that is intended to be executed.

codeExecutionResult

object ( CodeExecutionResult )

Optional. The result of executing the ExecutableCode .

Union field metadata .

metadata can be only one of the following:

videoMetadata

object ( VideoMetadata )

Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.

Blob

JSON representation
 { 
 "mimeType" 
 : 
 string 
 , 
 "data" 
 : 
 string 
 , 
 "displayName" 
 : 
 string 
 } 
Fields
mimeType

string

Required. The IANA standard MIME type of the source data.

data

string ( bytes format)

Required. The raw bytes of the data.

A base64-encoded string.

displayName

string

Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs.

This field is only returned in PromptMessage for prompt management. It is used in the Gemini calls only when server-side tools ( code_execution , google_search , and url_context ) are enabled.

FileData

JSON representation
 { 
 "mimeType" 
 : 
 string 
 , 
 "fileUri" 
 : 
 string 
 , 
 "displayName" 
 : 
 string 
 } 
Fields
mimeType

string

Required. The IANA standard MIME type of the source data.

fileUri

string

Required. The URI of the file in Google Cloud Storage.

displayName

string

Optional. The display name of the file. Used to provide a label or filename to distinguish files.

This field is only returned in PromptMessage for prompt management. It is used in the Gemini calls only when server side tools ( code_execution , google_search , and url_context ) are enabled.

FunctionCall

JSON representation
 { 
 "name" 
 : 
 string 
 , 
 "args" 
 : 
 { 
 object 
 } 
 , 
 "partialArgs" 
 : 
 [ 
 { 
 object (  PartialArg 
 
) 
 } 
 ] 
 , 
 "willContinue" 
 : 
 boolean 
 } 
Fields
name

string

Optional. The name of the function to call. Matches FunctionDeclaration.name .

args

object ( Struct format)

Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.

partialArgs[]

object ( PartialArg )

Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.

willContinue

boolean

Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow.

Struct

JSON representation
 { 
 "fields" 
 : 
 { 
 string 
 : 
 value 
 , 
 ... 
 } 
 } 
Fields
fields

map (key: string, value: value ( Value format))

Unordered map of dynamically typed values.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } .

FieldsEntry

JSON representation
 { 
 "key" 
 : 
 string 
 , 
 "value" 
 : 
 value 
 } 
Fields
key

string

value

value ( Value format)

Value

JSON representation
 { 
 // Union field kind 
can be only one of the following: 
 "nullValue" 
 : 
 null 
 , 
 "numberValue" 
 : 
 number 
 , 
 "stringValue" 
 : 
 string 
 , 
 "boolValue" 
 : 
 boolean 
 , 
 "structValue" 
 : 
 { 
 object 
 } 
 , 
 "listValue" 
 : 
 array 
 // End of list of possible types for union field kind 
. 
 } 
Fields
Union field kind . The kind of value. kind can be only one of the following:
nullValue

null

Represents a JSON null .

numberValue

number

Represents a JSON number. Must not be NaN , Infinity or -Infinity , since those are not supported in JSON. This also cannot represent large Int64 values, since JSON format generally does not support them in its number type.

stringValue

string

Represents a JSON string.

boolValue

boolean

Represents a JSON boolean ( true or false literal in JSON).

structValue

object ( Struct format)

Represents a JSON object.

listValue

array ( ListValue format)

Represents a JSON array.

ListValue

JSON representation
 { 
 "values" 
 : 
 [ 
 value 
 ] 
 } 
Fields
values[]

value ( Value format)

Repeated field of dynamically typed values.

PartialArg

JSON representation
 { 
 "jsonPath" 
 : 
 string 
 , 
 "willContinue" 
 : 
 boolean 
 , 
 // Union field delta 
can be only one of the following: 
 "nullValue" 
 : 
 null 
 , 
 "numberValue" 
 : 
 number 
 , 
 "stringValue" 
 : 
 string 
 , 
 "boolValue" 
 : 
 boolean 
 // End of list of possible types for union field delta 
. 
 } 
Fields
jsonPath

string

Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535 . e.g. "$.foo.bar[0].data".

willContinue

boolean

Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.

Union field delta . The delta of field value being streamed. delta can be only one of the following:
nullValue

null

Optional. Represents a null value.

numberValue

number

Optional. Represents a double value.

stringValue

string

Optional. Represents a string value.

boolValue

boolean

Optional. Represents a boolean value.

FunctionResponse

JSON representation
 { 
 "name" 
 : 
 string 
 , 
 "response" 
 : 
 { 
 object 
 } 
 , 
 "parts" 
 : 
 [ 
 { 
 object (  FunctionResponsePart 
 
) 
 } 
 ] 
 } 
Fields
name

string

Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name .

response

object ( Struct format)

Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output.

parts[]

object ( FunctionResponsePart )

Optional. Ordered Parts that constitute a function response. Parts may have different IANA MIME types.

FunctionResponsePart

JSON representation
 { 
 // Union field data 
can be only one of the following: 
 "inlineData" 
 : 
 { 
 object (  FunctionResponseBlob 
 
) 
 } 
 , 
 "fileData" 
 : 
 { 
 object (  FunctionResponseFileData 
 
) 
 } 
 // End of list of possible types for union field data 
. 
 } 
Fields
Union field data . The data of the function response part. data can be only one of the following:
inlineData

object ( FunctionResponseBlob )

Inline media bytes.

fileData

object ( FunctionResponseFileData )

URI based data.

FunctionResponseBlob

JSON representation
 { 
 "mimeType" 
 : 
 string 
 , 
 "data" 
 : 
 string 
 , 
 "displayName" 
 : 
 string 
 } 
Fields
mimeType

string

Required. The IANA standard MIME type of the source data.

data

string ( bytes format)

Required. Raw bytes.

A base64-encoded string.

displayName

string

Optional. Display name of the blob.

Used to provide a label or filename to distinguish blobs.

This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.

FunctionResponseFileData

JSON representation
 { 
 "mimeType" 
 : 
 string 
 , 
 "fileUri" 
 : 
 string 
 , 
 "displayName" 
 : 
 string 
 } 
Fields
mimeType

string

Required. The IANA standard MIME type of the source data.

fileUri

string

Required. URI.

displayName

string

Optional. Display name of the file data.

Used to provide a label or filename to distinguish file datas.

This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.

ExecutableCode

JSON representation
 { 
 "language" 
 : 
 enum ( Language 
) 
 , 
 "code" 
 : 
 string 
 } 
Fields
language

enum ( Language )

Required. Programming language of the code .

code

string

Required. The code to be executed.

CodeExecutionResult

JSON representation
 { 
 "outcome" 
 : 
 enum ( Outcome 
) 
 , 
 "output" 
 : 
 string 
 } 
Fields
outcome

enum ( Outcome )

Required. Outcome of the code execution.

output

string

Optional. Contains stdout when code execution is successful, stderr or other description otherwise.

JSON representation
 { 
 "startOffset" 
 : 
 string 
 , 
 "endOffset" 
 : 
 string 
 , 
 "fps" 
 : 
 number 
 } 
Fields
startOffset

string ( Duration format)

Optional. The start offset of the video.

A duration in seconds with up to nine fractional digits, ending with ' s '. Example: "3.5s" .

endOffset

string ( Duration format)

Optional. The end offset of the video.

A duration in seconds with up to nine fractional digits, ending with ' s '. Example: "3.5s" .

fps

number

Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].

Duration

JSON representation
 { 
 "seconds" 
 : 
 string 
 , 
 "nanos" 
 : 
 integer 
 } 
Fields
seconds

string ( int64 format)

Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years

nanos

integer

Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 seconds field and a positive or negative nanos field. For durations of one second or more, a non-zero value for the nanos field must be of the same sign as the seconds field. Must be from -999,999,999 to +999,999,999 inclusive.

MediaResolution

JSON representation
 { 
 // Union field value 
can be only one of the following: 
 "level" 
 : 
 enum ( Level 
) 
 // End of list of possible types for union field value 
. 
 } 
Fields

Union field value .

value can be only one of the following:

level

enum ( Level )

The tokenization quality used for given media.

EncryptionSpec

JSON representation
 { 
 "kmsKeyName" 
 : 
 string 
 } 
Fields
kmsKeyName

string

Required. Resource name of the Cloud KMS key used to protect the resource.

The Cloud KMS key must be in the same region as the resource. It must have the format projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} .

Tool Annotations

Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌

Design a Mobile Site
View Site in Mobile | Classic
Share by: