MCP Tools Reference: dataform.googleapis.com

Tool: create_repository

Create a new Dataform repository in a given Google Cloud project and location.

This tool establishes the root resource required for all other transformation assets, such as compilation results and workflow configurations. A repository must be created before any other Dataform MCP tool can be used. Enabling this tool is the first step in setting up a Dataform project.

The parent parameter value must be in the format projects/{project_id}/locations/{location}.

The repository_id parameter value is the ID to use for the repository.

The strictActAsChecks parameter value defaults to true.

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

Curl Request
                  
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": "create_repository",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

Input Schema

CreateRepository request message.

CreateRepositoryRequest

JSON representation
{
  "parent": string,
  "repository": {
    object (Repository)
  },
  "repositoryId": string
}
Fields
parent

string

Required. The location in which to create the repository. Must be in the format projects/*/locations/*.

repository

object (Repository)

Required. The repository to create.

repositoryId

string

Required. The ID to use for the repository, which will become the final component of the repository's resource name.

Repository

JSON representation
{
  "name": string,
  "createTime": string,
  "displayName": string,
  "gitRemoteSettings": {
    object (GitRemoteSettings)
  },
  "npmrcEnvironmentVariablesSecretVersion": string,
  "workspaceCompilationOverrides": {
    object (WorkspaceCompilationOverrides)
  },
  "labels": {
    string: string,
    ...
  },
  "setAuthenticatedUserAdmin": boolean,
  "serviceAccount": string,
  "kmsKeyName": string,
  "dataEncryptionState": {
    object (DataEncryptionState)
  },

  // Union field _containing_folder can be only one of the following:
  "containingFolder": string
  // End of list of possible types for union field _containing_folder.

  // Union field _team_folder_name can be only one of the following:
  "teamFolderName": string
  // End of list of possible types for union field _team_folder_name.

  // 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

Identifier. The repository's name.

createTime

string (Timestamp format)

Output only. The timestamp of when the repository 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".

displayName

string

Optional. The repository's user-friendly name.

gitRemoteSettings

object (GitRemoteSettings)

Optional. If set, configures this repository to be linked to a Git remote.

npmrcEnvironmentVariablesSecretVersion

string

Optional. The name of the Secret Manager secret version to be used to interpolate variables into the .npmrc file for package installation operations. Must be in the format projects/*/secrets/*/versions/*. The file itself must be in a JSON format.

workspaceCompilationOverrides

object (WorkspaceCompilationOverrides)

Optional. If set, fields of workspace_compilation_overrides override the default compilation settings that are specified in dataform.json when creating workspace-scoped compilation results. See documentation for WorkspaceCompilationOverrides for more information.

labels

map (key: string, value: string)

Optional. Repository user labels.

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

setAuthenticatedUserAdmin

boolean

Optional. Input only. If set to true, the authenticated user will be granted the roles/dataform.admin role on the created repository. To modify access to the created repository later apply setIamPolicy from https://cloud.google.com/dataform/reference/rest#rest-resource:-v1beta1.projects.locations.repositories

serviceAccount

string

Optional. The service account to run workflow invocations under.

kmsKeyName

string

Optional. The reference to a KMS encryption key. If provided, it will be used to encrypt user data in the repository and all child resources. It is not possible to add or update the encryption key after the repository is created. Example: projects/{kms_project}/locations/{location}/keyRings/{key_location}/cryptoKeys/{key}

dataEncryptionState

object (DataEncryptionState)

Output only. A data encryption state of a Git repository if this Repository is protected by a KMS key.

Union field _containing_folder.

_containing_folder can be only one of the following:

containingFolder

string

Optional. The name of the containing folder of the repository. The field is immutable and it can be modified via a MoveRepository operation. Format: projects/*/locations/*/folders/*. or projects/*/locations/*/teamFolders/*.

Union field _team_folder_name.

_team_folder_name can be only one of the following:

teamFolderName

string

Output only. The resource name of the TeamFolder that this Repository is associated with. This should take the format: projects/{project}/locations/{location}/teamFolders/{teamFolder}. If this is not set, the Repository is not associated with a TeamFolder.

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.

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.

GitRemoteSettings

JSON representation
{
  "url": string,
  "defaultBranch": string,
  "effectiveDefaultBranch": string,
  "authenticationTokenSecretVersion": string,
  "sshAuthenticationConfig": {
    object (SshAuthenticationConfig)
  },
  "tokenStatus": enum (TokenStatus),

  // Union field _git_repository_link can be only one of the following:
  "gitRepositoryLink": string
  // End of list of possible types for union field _git_repository_link.
}
Fields
url

string

Required. The Git remote's URL.

defaultBranch

string

Optional. The Git remote's default branch name. If not set, main will be used.

effectiveDefaultBranch

string

Output only. The Git remote's effective default branch name. This is the default branch name of the Git remote if it is set, otherwise it is main.

authenticationTokenSecretVersion

string

Optional. The name of the Secret Manager secret version to use as an authentication token for Git operations. Must be in the format projects/*/secrets/*/versions/*.

sshAuthenticationConfig

object (SshAuthenticationConfig)

Optional. Authentication fields for remote uris using SSH protocol.

tokenStatus
(deprecated)

enum (TokenStatus)

Output only. Deprecated: The field does not contain any token status information. Instead use https://cloud.google.com/dataform/reference/rest/v1beta1/projects.locations.repositories/computeAccessTokenStatus

Union field _git_repository_link.

_git_repository_link can be only one of the following:

gitRepositoryLink

string

Optional. Resource name for the GitRepositoryLink used for machine credentials. Must be in the format projects/*/locations/*/connections/*/gitRepositoryLinks/*

SshAuthenticationConfig

JSON representation
{
  "userPrivateKeySecretVersion": string,
  "hostPublicKey": string
}
Fields
userPrivateKeySecretVersion

string

Required. The name of the Secret Manager secret version to use as a ssh private key for Git operations. Must be in the format projects/*/secrets/*/versions/*.

hostPublicKey

string

Required. Content of a public SSH key to verify an identity of a remote Git host.

WorkspaceCompilationOverrides

JSON representation
{
  "defaultDatabase": string,
  "schemaSuffix": string,
  "tablePrefix": string
}
Fields
defaultDatabase

string

Optional. The default database (Google Cloud project ID).

schemaSuffix

string

Optional. The suffix that should be appended to all schema (BigQuery dataset ID) names.

tablePrefix

string

Optional. The prefix that should be prepended to all table names.

LabelsEntry

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

string

value

string

DataEncryptionState

JSON representation
{
  "kmsKeyVersionName": string
}
Fields
kmsKeyVersionName

string

Required. The KMS key version name with which data of a resource is encrypted.

TokenStatus

The status of the authentication token.

Enums
TOKEN_STATUS_UNSPECIFIED Default value. This value is unused.
NOT_FOUND The token could not be found in Secret Manager (or the Dataform Service Account did not have permission to access it).
INVALID The token could not be used to authenticate against the Git remote.
VALID The token was used successfully to authenticate against the Git remote.

Output Schema

Represents a Dataform Git repository.

Repository

JSON representation
{
  "name": string,
  "createTime": string,
  "displayName": string,
  "gitRemoteSettings": {
    object (GitRemoteSettings)
  },
  "npmrcEnvironmentVariablesSecretVersion": string,
  "workspaceCompilationOverrides": {
    object (WorkspaceCompilationOverrides)
  },
  "labels": {
    string: string,
    ...
  },
  "setAuthenticatedUserAdmin": boolean,
  "serviceAccount": string,
  "kmsKeyName": string,
  "dataEncryptionState": {
    object (DataEncryptionState)
  },

  // Union field _containing_folder can be only one of the following:
  "containingFolder": string
  // End of list of possible types for union field _containing_folder.

  // Union field _team_folder_name can be only one of the following:
  "teamFolderName": string
  // End of list of possible types for union field _team_folder_name.

  // 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

Identifier. The repository's name.

createTime

string (Timestamp format)

Output only. The timestamp of when the repository 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".

displayName

string

Optional. The repository's user-friendly name.

gitRemoteSettings

object (GitRemoteSettings)

Optional. If set, configures this repository to be linked to a Git remote.

npmrcEnvironmentVariablesSecretVersion

string

Optional. The name of the Secret Manager secret version to be used to interpolate variables into the .npmrc file for package installation operations. Must be in the format projects/*/secrets/*/versions/*. The file itself must be in a JSON format.

workspaceCompilationOverrides

object (WorkspaceCompilationOverrides)

Optional. If set, fields of workspace_compilation_overrides override the default compilation settings that are specified in dataform.json when creating workspace-scoped compilation results. See documentation for WorkspaceCompilationOverrides for more information.

labels

map (key: string, value: string)

Optional. Repository user labels.

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

setAuthenticatedUserAdmin

boolean

Optional. Input only. If set to true, the authenticated user will be granted the roles/dataform.admin role on the created repository. To modify access to the created repository later apply setIamPolicy from https://cloud.google.com/dataform/reference/rest#rest-resource:-v1beta1.projects.locations.repositories

serviceAccount

string

Optional. The service account to run workflow invocations under.

kmsKeyName

string

Optional. The reference to a KMS encryption key. If provided, it will be used to encrypt user data in the repository and all child resources. It is not possible to add or update the encryption key after the repository is created. Example: projects/{kms_project}/locations/{location}/keyRings/{key_location}/cryptoKeys/{key}

dataEncryptionState

object (DataEncryptionState)

Output only. A data encryption state of a Git repository if this Repository is protected by a KMS key.

Union field _containing_folder.

_containing_folder can be only one of the following:

containingFolder

string

Optional. The name of the containing folder of the repository. The field is immutable and it can be modified via a MoveRepository operation. Format: projects/*/locations/*/folders/*. or projects/*/locations/*/teamFolders/*.

Union field _team_folder_name.

_team_folder_name can be only one of the following:

teamFolderName

string

Output only. The resource name of the TeamFolder that this Repository is associated with. This should take the format: projects/{project}/locations/{location}/teamFolders/{teamFolder}. If this is not set, the Repository is not associated with a TeamFolder.

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.

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.

GitRemoteSettings

JSON representation
{
  "url": string,
  "defaultBranch": string,
  "effectiveDefaultBranch": string,
  "authenticationTokenSecretVersion": string,
  "sshAuthenticationConfig": {
    object (SshAuthenticationConfig)
  },
  "tokenStatus": enum (TokenStatus),

  // Union field _git_repository_link can be only one of the following:
  "gitRepositoryLink": string
  // End of list of possible types for union field _git_repository_link.
}
Fields
url

string

Required. The Git remote's URL.

defaultBranch

string

Optional. The Git remote's default branch name. If not set, main will be used.

effectiveDefaultBranch

string

Output only. The Git remote's effective default branch name. This is the default branch name of the Git remote if it is set, otherwise it is main.

authenticationTokenSecretVersion

string

Optional. The name of the Secret Manager secret version to use as an authentication token for Git operations. Must be in the format projects/*/secrets/*/versions/*.

sshAuthenticationConfig

object (SshAuthenticationConfig)

Optional. Authentication fields for remote uris using SSH protocol.

tokenStatus
(deprecated)

enum (TokenStatus)

Output only. Deprecated: The field does not contain any token status information. Instead use https://cloud.google.com/dataform/reference/rest/v1beta1/projects.locations.repositories/computeAccessTokenStatus

Union field _git_repository_link.

_git_repository_link can be only one of the following:

gitRepositoryLink

string

Optional. Resource name for the GitRepositoryLink used for machine credentials. Must be in the format projects/*/locations/*/connections/*/gitRepositoryLinks/*

SshAuthenticationConfig

JSON representation
{
  "userPrivateKeySecretVersion": string,
  "hostPublicKey": string
}
Fields
userPrivateKeySecretVersion

string

Required. The name of the Secret Manager secret version to use as a ssh private key for Git operations. Must be in the format projects/*/secrets/*/versions/*.

hostPublicKey

string

Required. Content of a public SSH key to verify an identity of a remote Git host.

WorkspaceCompilationOverrides

JSON representation
{
  "defaultDatabase": string,
  "schemaSuffix": string,
  "tablePrefix": string
}
Fields
defaultDatabase

string

Optional. The default database (Google Cloud project ID).

schemaSuffix

string

Optional. The suffix that should be appended to all schema (BigQuery dataset ID) names.

tablePrefix

string

Optional. The prefix that should be prepended to all table names.

LabelsEntry

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

string

value

string

DataEncryptionState

JSON representation
{
  "kmsKeyVersionName": string
}
Fields
kmsKeyVersionName

string

Required. The KMS key version name with which data of a resource is encrypted.

TokenStatus

The status of the authentication token.

Enums
TOKEN_STATUS_UNSPECIFIED Default value. This value is unused.
NOT_FOUND The token could not be found in Secret Manager (or the Dataform Service Account did not have permission to access it).
INVALID The token could not be used to authenticate against the Git remote.
VALID The token was used successfully to authenticate against the Git remote.

Tool Annotations

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