## Tool: `get_workflow_invocation`

Fetch a single Dataform workflow invocation.

The `name` parameter value must be in the format `projects/{project_id}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}`.

The following code sample shows how to use `curl` to call the `get_workflow_invocation` MCP tool.

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

## Input Schema

`GetWorkflowInvocation` request message.

### GetWorkflowInvocationRequest

| JSON representation |
|---|
| ``` { "name": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Required. The workflow invocation resource's name. |

## Output Schema

Represents a single invocation of a compilation result.

### WorkflowInvocation

| JSON representation |
|---|
| ``` { "name": string, "invocationConfig": { object (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/list_workflow_configs#Output.Schema.InvocationConfig`) }, "state": enum (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/list_workflow_invocations#Output.Schema.State`), "invocationTiming": { object (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/list_workflow_invocations#Output.Schema.Interval`) }, "resolvedCompilationResult": string, "dataEncryptionState": { object (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/list_repositories#Output.Schema.DataEncryptionState`) }, "privateResourceMetadata": { object (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/create_compilation_result#Input.Schema.PrivateResourceMetadata`) }, "pipelineConfig": { object (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/list_release_configs#Output.Schema.PipelineConfig`) }, // Union field `compilation_source` can be only one of the following: "compilationResult": string, "workflowConfig": string // End of list of possible types for union field `compilation_source`. // Union field `_internal_metadata` can be only one of the following: "internalMetadata": string // End of list of possible types for union field `_internal_metadata`. } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. The workflow invocation's name. |
| `invocationConfig` | ``object (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/list_workflow_configs#Output.Schema.InvocationConfig`)`` Immutable. If left unset, a default InvocationConfig will be used. |
| `state` | ``enum (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/list_workflow_invocations#Output.Schema.State`)`` Output only. This workflow invocation's current state. |
| `invocationTiming` | ``object (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/list_workflow_invocations#Output.Schema.Interval`)`` Output only. This workflow invocation's timing details. |
| `resolvedCompilationResult` | `string` Output only. The resolved compilation result that was used to create this invocation. Will be in the format `projects/*/locations/*/repositories/*/compilationResults/*`. |
| `dataEncryptionState` | ``object (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/list_repositories#Output.Schema.DataEncryptionState`)`` Output only. Only set if the repository has a KMS Key. |
| `privateResourceMetadata` | ``object (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/create_compilation_result#Input.Schema.PrivateResourceMetadata`)`` Output only. Metadata indicating whether this resource is user-scoped. `WorkflowInvocation` resource is `user_scoped` only if it is sourced from a compilation result and the compilation result is user-scoped. |
| `pipelineConfig` | ``object (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/list_release_configs#Output.Schema.PipelineConfig`)`` Output only. The pipeline options which defines the pipeline type and path within the Git repository. |
| Union field `compilation_source`. The source of the compilation result to use for this invocation. `compilation_source` can be only one of the following: ||
| `compilationResult` | `string` Immutable. The name of the compilation result to use for this invocation. Must be in the format `projects/*/locations/*/repositories/*/compilationResults/*`. |
| `workflowConfig` | `string` Immutable. The name of the workflow config to invoke. Must be in the format `projects/*/locations/*/repositories/*/workflowConfigs/*`. |
|   ||
| Union field `_internal_metadata`. `_internal_metadata` can be only one of the following: ||
| `internalMetadata` | `string` Output only. All the metadata information that is used internally to serve the resource. For example: timestamps, flags, status fields, etc. The format of this field is a JSON string. |
|   ||

### InvocationConfig

| JSON representation |
|---|
| ``` { "includedTargets": [ { object (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/list_workflow_configs#Output.Schema.Target`) } ], "includedTags": [ string ], "transitiveDependenciesIncluded": boolean, "transitiveDependentsIncluded": boolean, "fullyRefreshIncrementalTablesEnabled": boolean, "serviceAccount": string, // Union field `_query_priority` can be only one of the following: "queryPriority": enum (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/list_workflow_configs#Output.Schema.QueryPriority`) // End of list of possible types for union field `_query_priority`. } ``` |

| Fields ||
|---|---|
| `includedTargets[]` | ``object (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/list_workflow_configs#Output.Schema.Target`)`` Optional. The set of action identifiers to include. |
| `includedTags[]` | `string` Optional. The set of tags to include. |
| `transitiveDependenciesIncluded` | `boolean` Optional. When set to true, transitive dependencies of included actions will be executed. |
| `transitiveDependentsIncluded` | `boolean` Optional. When set to true, transitive dependents of included actions will be executed. |
| `fullyRefreshIncrementalTablesEnabled` | `boolean` Optional. When set to true, any incremental tables will be fully refreshed. |
| `serviceAccount` | `string` Optional. The service account to run workflow invocations under. |
| Union field `_query_priority`. `_query_priority` can be only one of the following: ||
| `queryPriority` | ``enum (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/list_workflow_configs#Output.Schema.QueryPriority`)`` Optional. Specifies the priority for query execution in BigQuery. More information can be found at <https://cloud.google.com/bigquery/docs/running-queries#queries>. |
|   ||

### Target

| JSON representation |
|---|
| ``` { "database": string, "schema": string, "name": string } ``` |

| Fields ||
|---|---|
| `database` | `string` Optional. The action's database (Google Cloud project ID) . |
| `schema` | `string` Optional. The action's schema (BigQuery dataset ID), within `database`. |
| `name` | `string` Optional. The action's name, within `database` and `schema`. |

### Interval

| JSON representation |
|---|
| ``` { "startTime": string, "endTime": string } ``` |

| Fields ||
|---|---|
| `startTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. 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 (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. 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"`. |

### Timestamp

| JSON representation |
|---|
| ``` { "seconds": string, "nanos": integer } ``` |

| Fields ||
|---|---|
| `seconds` | `string (https://developers.google.com/discovery/v1/type-format 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. |

### DataEncryptionState

| JSON representation |
|---|
| ``` { "kmsKeyVersionName": string } ``` |

| Fields ||
|---|---|
| `kmsKeyVersionName` | `string` Required. The KMS key version name with which data of a resource is encrypted. |

### PrivateResourceMetadata

| JSON representation |
|---|
| ``` { "userScoped": boolean } ``` |

| Fields ||
|---|---|
| `userScoped` | `boolean` Output only. If true, this resource is user-scoped, meaning it is either a workspace or sourced from a workspace. |

### PipelineConfig

| JSON representation |
|---|
| ``` { "pipelineType": enum (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/list_release_configs#Output.Schema.PipelineType`), "path": string } ``` |

| Fields ||
|---|---|
| `pipelineType` | ``enum (`https://docs.cloud.google.com/dataform/docs/reference/mcp/tools_list/list_release_configs#Output.Schema.PipelineType`)`` Required. The type of the pipeline. |
| `path` | `string` Required. The relative path within the Git repository where the pipeline is defined. For example, for a Dataform pipeline, it is a path to the folder where `workflow_settings.yaml` or `dataform.json` is located. |

### QueryPriority

Types of priority for query execution in BigQuery.

| Enums ||
|---|---|
| `QUERY_PRIORITY_UNSPECIFIED` | Default value. This value is unused. |
| `INTERACTIVE` | Query will be executed in BigQuery with interactive priority. More information can be found at <https://cloud.google.com/bigquery/docs/running-queries#queries>. |
| `BATCH` | Query will be executed in BigQuery with batch priority. More information can be found at <https://cloud.google.com/bigquery/docs/running-queries#batchqueries>. |

### State

Represents the current state of a workflow invocation.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Default value. This value is unused. |
| `RUNNING` | The workflow invocation is currently running. |
| `SUCCEEDED` | The workflow invocation succeeded. A terminal state. |
| `CANCELLED` | The workflow invocation was cancelled. A terminal state. |
| `FAILED` | The workflow invocation failed. A terminal state. |
| `CANCELING` | The workflow invocation is being cancelled, but some actions are still running. |

### PipelineType

The type of the pipeline. This may be extended in the future. In case of UNSPECIFIED, the error will be thrown.

| Enums ||
|---|---|
| `PIPELINE_TYPE_UNSPECIFIED` | Default value. This value is unused. |
| `DATAFORM` | Regular Dataform pipeline. |
| `SQL` | SQL single file asset. |
| `NOTEBOOK` | Notebook single file asset. |

### Tool Annotations


[Tool annotations](https://modelcontextprotocol.io/specification/latest/schema#toolannotations) are sent to MCP clients to describe the basic risk of a given tool. Most clients treat these hints as untrusted, but they can be used to decide when a confirmation prompt might be sent to a user.


Along with the title string, the following boolean hints are defined as follows:

- `readOnlyHint`: If true, the tool doesn't modify its environment. Default: false.
- `destructiveHint`: If true, then the tool can perform destructive actions. If false, then the tool can only perform additive actions. Default: true.
- `idempotentHint`: If true, then calling the tool repeatedly with the same arguments will have no additional effect on its environment. Default: false.
- `openWorldHint`: If true, then the tool can interact with an 'open world' of external entities. If false, then the tool can only interact with internal entities. For example, a web search tool would be open world, while a memory tool would not be open world.

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