Tool: update_repository
Update the properties of an existing Dataform repository, such as its Git remote settings, workspace compilation overrides, or the default service account.
Prerequisite: Use the get_repository tool to read the current repository state before updating.
If the update_mask parameter value is omitted, all mutable fields are overwritten with the values supplied in the repository parameter value. To modify only specific fields without clearing the others, list those fields in update_mask.
The repository.name parameter value must be in the format projects/{project_id}/locations/{location}/repositories/{repository}.
The following code sample shows how to use curl to call the update_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": "update_repository", "arguments": { // Provide these details according to the MCP tool specification. } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
UpdateRepository request message.
UpdateRepositoryRequest
| JSON representation |
|---|
{
"updateMask": string,
"repository": {
object ( |
| Fields | |
|---|---|
updateMask |
Optional. Specifies the fields to be updated in the repository. If left unset, all fields will be updated. This is a comma-separated list of fully qualified names of fields. Example: |
repository |
Required. The repository to update. |
FieldMask
| JSON representation |
|---|
{ "paths": [ string ] } |
| Fields | |
|---|---|
paths[] |
The set of field mask paths. |
Repository
| JSON representation |
|---|
{ "name": string, "createTime": string, "displayName": string, "gitRemoteSettings": { object ( |
| Fields | |
|---|---|
name |
Identifier. The repository's name. |
createTime |
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: |
displayName |
Optional. The repository's user-friendly name. |
gitRemoteSettings |
Optional. If set, configures this repository to be linked to a Git remote. |
npmrcEnvironmentVariablesSecretVersion |
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 |
workspaceCompilationOverrides |
Optional. If set, fields of |
labels |
Optional. Repository user labels. An object containing a list of |
setAuthenticatedUserAdmin |
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 |
Optional. The service account to run workflow invocations under. |
kmsKeyName |
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: |
dataEncryptionState |
Output only. A data encryption state of a Git repository if this Repository is protected by a KMS key. |
Union field
|
|
containingFolder |
Optional. The name of the containing folder of the repository. The field is immutable and it can be modified via a MoveRepository operation. Format: |
Union field
|
|
teamFolderName |
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
|
|
internalMetadata |
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 |
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. |
GitRemoteSettings
| JSON representation |
|---|
{ "url": string, "defaultBranch": string, "effectiveDefaultBranch": string, "authenticationTokenSecretVersion": string, "sshAuthenticationConfig": { object ( |
| Fields | |
|---|---|
url |
Required. The Git remote's URL. |
defaultBranch |
Optional. The Git remote's default branch name. If not set, |
effectiveDefaultBranch |
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 |
authenticationTokenSecretVersion |
Optional. The name of the Secret Manager secret version to use as an authentication token for Git operations. Must be in the format |
sshAuthenticationConfig |
Optional. Authentication fields for remote uris using SSH protocol. |
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
|
|
gitRepositoryLink |
Optional. Resource name for the |
SshAuthenticationConfig
| JSON representation |
|---|
{ "userPrivateKeySecretVersion": string, "hostPublicKey": string } |
| Fields | |
|---|---|
userPrivateKeySecretVersion |
Required. The name of the Secret Manager secret version to use as a ssh private key for Git operations. Must be in the format |
hostPublicKey |
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 |
Optional. The default database (Google Cloud project ID). |
schemaSuffix |
Optional. The suffix that should be appended to all schema (BigQuery dataset ID) names. |
tablePrefix |
Optional. The prefix that should be prepended to all table names. |
LabelsEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
DataEncryptionState
| JSON representation |
|---|
{ "kmsKeyVersionName": string } |
| Fields | |
|---|---|
kmsKeyVersionName |
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 ( |
| Fields | |
|---|---|
name |
Identifier. The repository's name. |
createTime |
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: |
displayName |
Optional. The repository's user-friendly name. |
gitRemoteSettings |
Optional. If set, configures this repository to be linked to a Git remote. |
npmrcEnvironmentVariablesSecretVersion |
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 |
workspaceCompilationOverrides |
Optional. If set, fields of |
labels |
Optional. Repository user labels. An object containing a list of |
setAuthenticatedUserAdmin |
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 |
Optional. The service account to run workflow invocations under. |
kmsKeyName |
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: |
dataEncryptionState |
Output only. A data encryption state of a Git repository if this Repository is protected by a KMS key. |
Union field
|
|
containingFolder |
Optional. The name of the containing folder of the repository. The field is immutable and it can be modified via a MoveRepository operation. Format: |
Union field
|
|
teamFolderName |
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
|
|
internalMetadata |
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 |
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. |
GitRemoteSettings
| JSON representation |
|---|
{ "url": string, "defaultBranch": string, "effectiveDefaultBranch": string, "authenticationTokenSecretVersion": string, "sshAuthenticationConfig": { object ( |
| Fields | |
|---|---|
url |
Required. The Git remote's URL. |
defaultBranch |
Optional. The Git remote's default branch name. If not set, |
effectiveDefaultBranch |
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 |
authenticationTokenSecretVersion |
Optional. The name of the Secret Manager secret version to use as an authentication token for Git operations. Must be in the format |
sshAuthenticationConfig |
Optional. Authentication fields for remote uris using SSH protocol. |
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
|
|
gitRepositoryLink |
Optional. Resource name for the |
SshAuthenticationConfig
| JSON representation |
|---|
{ "userPrivateKeySecretVersion": string, "hostPublicKey": string } |
| Fields | |
|---|---|
userPrivateKeySecretVersion |
Required. The name of the Secret Manager secret version to use as a ssh private key for Git operations. Must be in the format |
hostPublicKey |
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 |
Optional. The default database (Google Cloud project ID). |
schemaSuffix |
Optional. The suffix that should be appended to all schema (BigQuery dataset ID) names. |
tablePrefix |
Optional. The prefix that should be prepended to all table names. |
LabelsEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
DataEncryptionState
| JSON representation |
|---|
{ "kmsKeyVersionName": string } |
| Fields | |
|---|---|
kmsKeyVersionName |
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
Tool annotations 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: ❌