Tool: notebook_execution_get_job
Describes a Colab Enterprise notebook execution job. Use this to retrieve details and status for a specific execution.
The following sample demonstrate how to use curl
to invoke the notebook_execution_get_job
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": "notebook_execution_get_job", "arguments": { // provide these details according to the tool' s MCP specification } } , "jsonrpc" : "2.0" , "id" : 1 } ' |
Input Schema
Request message for [NotebookService.GetNotebookExecutionJob]
GetNotebookExecutionJobRequest
| JSON representation |
|---|
{
"name"
:
string
,
"view"
:
enum (
|
| Fields | |
|---|---|
name
|
Required. The name of the NotebookExecutionJob resource. |
view
|
Optional. The NotebookExecutionJob view. Defaults to BASIC. |
Output Schema
NotebookExecutionJob represents an instance of a notebook execution.
NotebookExecutionJob
| JSON representation |
|---|
{ "name" : string , "displayName" : string , "executionTimeout" : string , "scheduleResourceName" : string , "jobState" : enum ( |
name
string
Output only. The resource name of this NotebookExecutionJob. Format: projects/{project_id}/locations/{location}/notebookExecutionJobs/{job_id}
displayName
string
The display name of the NotebookExecutionJob. The name can be up to 128 characters long and can consist of any UTF-8 characters.
executionTimeout
string (
Duration
format)
Max running time of the execution job in seconds (default 86400s / 24 hrs).
A duration in seconds with up to nine fractional digits, ending with ' s
'. Example: "3.5s"
.
scheduleResourceName
string
The Schedule resource name if this job is triggered by one. Format: projects/{project_id}/locations/{location}/schedules/{schedule_id}
jobState
enum (
JobState
)
Output only. The state of the NotebookExecutionJob.
status
object (
Status
)
Output only. Populated when the NotebookExecutionJob is completed. When there is an error during notebook execution, the error details are populated.
createTime
string (
Timestamp
format)
Output only. Timestamp when this NotebookExecutionJob 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"
.
updateTime
string (
Timestamp
format)
Output only. Timestamp when this NotebookExecutionJob 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"
.
labels
map (key: string, value: string)
The labels with user-defined metadata to organize NotebookExecutionJobs.
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. System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable.
An object containing a list of "key": value
pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }
.
kernelName
string
The name of the kernel to use during notebook execution. If unset, the default kernel is used.
encryptionSpec
object (
EncryptionSpec
)
Customer-managed encryption key spec for the notebook execution job. This field is auto-populated if the NotebookRuntimeTemplate
has an encryption spec.
notebook_source
. The input notebook. notebook_source
can be only one of the following:dataformRepositorySource
object (
DataformRepositorySource
)
The Dataform Repository pointing to a single file notebook repository.
gcsNotebookSource
object (
GcsNotebookSource
)
The Cloud Storage url pointing to the ipynb file. Format: gs://bucket/notebook_file.ipynb
directNotebookSource
object (
DirectNotebookSource
)
The contents of an input notebook file.
environment_spec
. The compute config to use for an execution job. environment_spec
can be only one of the following:notebookRuntimeTemplateResourceName
string
The NotebookRuntimeTemplate to source compute configuration from.
customEnvironmentSpec
object (
CustomEnvironmentSpec
)
The custom compute configuration for an execution job.
execution_sink
. The location to store the notebook execution result. execution_sink
can be only one of the following:gcsOutputUri
string
The Cloud Storage location to upload the result to. Format: gs://bucket-name
execution_identity
. The identity to run the execution as. execution_identity
can be only one of the following:executionUser
string
The user email to run the execution as. Only supported by Colab runtimes.
serviceAccount
string
The service account to run the execution as.
runtime_environment
. Runtime environment for the notebook execution job. If unspecified, the default runtime of Colab is used. runtime_environment
can be only one of the following:workbenchRuntime
object (
WorkbenchRuntime
)
The Workbench runtime configuration to use for the notebook execution.
DataformRepositorySource
| JSON representation |
|---|
{ "dataformRepositoryResourceName" : string , "commitSha" : string } |
| Fields | |
|---|---|
dataformRepositoryResourceName
|
The resource name of the Dataform Repository. Format: |
commitSha
|
The commit SHA to read repository with. If unset, the file will be read at HEAD. |
GcsNotebookSource
| JSON representation |
|---|
{ "uri" : string , "generation" : string } |
| Fields | |
|---|---|
uri
|
The Cloud Storage uri pointing to the ipynb file. Format: |
generation
|
The version of the Cloud Storage object to read. If unset, the current version of the object is read. See https://cloud.google.com/storage/docs/metadata#generation-number . |
DirectNotebookSource
| JSON representation |
|---|
{ "content" : string } |
| Fields | |
|---|---|
content
|
The base64-encoded contents of the input notebook file. A base64-encoded string. |
CustomEnvironmentSpec
| JSON representation |
|---|
{ "machineSpec" : { object ( |
| Fields | |
|---|---|
machineSpec
|
The specification of a single machine for the execution job. |
persistentDiskSpec
|
The specification of a persistent disk to attach for the execution job. |
networkSpec
|
The network configuration to use for the execution job. |
MachineSpec
| JSON representation |
|---|
{ "machineType" : string , "acceleratorType" : enum ( |
| Fields | |
|---|---|
machineType
|
Immutable. The type of the machine. See the list of machine types supported for prediction See the list of machine types supported for custom training . For |
acceleratorType
|
Immutable. The type of accelerator(s) that may be attached to the machine as per |
acceleratorCount
|
The number of accelerators to attach to the machine. For accelerator optimized machine types ( https://cloud.google.com/compute/docs/accelerator-optimized-machines) , One may set the accelerator_count from 1 to N for machine with N GPUs. If accelerator_count is less than or equal to N / 2, Vertex will co-schedule the replicas of the model into the same VM to save cost. For example, if the machine type is a3-highgpu-8g, which has 8 H100 GPUs, one can set accelerator_count to 1 to 8. If accelerator_count is 1, 2, 3, or 4, Vertex will co-schedule 8, 4, 2, or 2 replicas of the model into the same VM to save cost. When co-scheduling, CPU, memory and storage on the VM will be distributed to replicas on the VM. For example, one can expect a co-scheduled replica requesting 2 GPUs out of a 8-GPU VM will receive 25% of the CPU, memory and storage of the VM. Note that the feature is not compatible with [multihost_gpu_node_count][]. When multihost_gpu_node_count is set, the co-scheduling will not be enabled. |
gpuPartitionSize
|
Optional. Immutable. The Nvidia GPU partition size. When specified, the requested accelerators will be partitioned into smaller GPU partitions. For example, if the request is for 8 units of NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will create 8 * 7 = 56 partitioned MIG instances. The partition size must be a value supported by the requested accelerator. Refer to Nvidia GPU Partitioning for the available partition sizes. If set, the accelerator_count should be set to 1. |
tpuTopology
|
Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1"). |
reservationAffinity
|
Optional. Immutable. Configuration controlling how this resource pool consumes reservation. |
ReservationAffinity
| JSON representation |
|---|
{
"reservationAffinityType"
:
enum (
|
| Fields | |
|---|---|
reservationAffinityType
|
Required. Specifies the reservation affinity type. |
key
|
Optional. Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, use |
values[]
|
Optional. Corresponds to the label values of a reservation resource. This must be the full resource name of the reservation or reservation block. |
PersistentDiskSpec
| JSON representation |
|---|
{ "diskType" : string , "diskSizeGb" : string } |
| Fields | |
|---|---|
diskType
|
Type of the disk (default is "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) "pd-standard" (Persistent Disk Hard Disk Drive) "pd-balanced" (Balanced Persistent Disk) "pd-extreme" (Extreme Persistent Disk) |
diskSizeGb
|
Size in GB of the disk (default is 100GB). |
NetworkSpec
| JSON representation |
|---|
{ "enableInternetAccess" : boolean , "network" : string , "subnetwork" : string } |
| Fields | |
|---|---|
enableInternetAccess
|
Whether to enable public internet access. Default false. |
network
|
The full name of the Google Compute Engine network |
subnetwork
|
The name of the subnet that this instance is in. Format: |
Duration
| JSON representation |
|---|
{ "seconds" : string , "nanos" : integer } |
| Fields | |
|---|---|
seconds
|
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
|
Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 |
Status
| JSON representation |
|---|
{ "code" : integer , "message" : string , "details" : [ { "@type" : string , field1 : ... , ... } ] } |
| Fields | |
|---|---|
code
|
The status code, which should be an enum value of |
message
|
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the |
details[]
|
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 |
Any
| JSON representation |
|---|
{ "typeUrl" : string , "value" : string } |
| Fields | |
|---|---|
typeUrl
|
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 The prefix is arbitrary and Protobuf implementations are expected to simply strip off everything up to and including the last 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): In the original design of |
value
|
Holds a Protobuf serialization of the type described by type_url. A base64-encoded string. |
Timestamp
| JSON representation |
|---|
{ "seconds" : string , "nanos" : integer } |
| Fields | |
|---|---|
seconds
|
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
|
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. |
LabelsEntry
| JSON representation |
|---|
{ "key" : string , "value" : string } |
| Fields | |
|---|---|
key
|
|
value
|
|
EncryptionSpec
| JSON representation |
|---|
{ "kmsKeyName" : string } |
| Fields | |
|---|---|
kmsKeyName
|
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 |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌

