MCP Tools Reference: dataform.googleapis.com

Tool: commit_repository_changes

Apply a Git commit to record the state of files within a Dataform repository.

This tool is primarily intended for managing single-file assets—such as notebooks or saved queries—that reside directly in the repository. This tool isn't used in typical pipeline workflows that require workspaces.

This commit action creates a permanent entry in the repository's internal Git history.

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

The following sample demonstrate how to use curl to invoke the commit_repository_changes 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": "commit_repository_changes",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

Input Schema

CommitRepositoryChanges request message.

CommitRepositoryChangesRequest

JSON representation
{
  "name": string,
  "commitMetadata": {
    object (CommitMetadata)
  },
  "requiredHeadCommitSha": string,
  "fileOperations": {
    string: {
      object (FileOperation)
    },
    ...
  }
}
Fields
name

string

Required. The repository's name.

commitMetadata

object (CommitMetadata)

Required. The changes to commit to the repository.

requiredHeadCommitSha

string

Optional. The commit SHA which must be the repository's current HEAD before applying this commit; otherwise this request will fail. If unset, no validation on the current HEAD commit SHA is performed.

fileOperations

map (key: string, value: object (FileOperation))

Optional. A map to the path of the file to the operation. The path is the full file path including filename, from repository root.

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

CommitMetadata

JSON representation
{
  "author": {
    object (CommitAuthor)
  },
  "commitMessage": string
}
Fields
author

object (CommitAuthor)

Required. The commit's author.

commitMessage

string

Optional. The commit's message.

CommitAuthor

JSON representation
{
  "name": string,
  "emailAddress": string
}
Fields
name

string

Required. The commit author's name.

emailAddress

string

Required. The commit author's email address.

FileOperationsEntry

JSON representation
{
  "key": string,
  "value": {
    object (FileOperation)
  }
}
Fields
key

string

value

object (FileOperation)

FileOperation

JSON representation
{

  // Union field operation can be only one of the following:
  "writeFile": {
    object (WriteFile)
  },
  "deleteFile": {
    object (DeleteFile)
  }
  // End of list of possible types for union field operation.
}
Fields
Union field operation. The operation to perform on the file. operation can be only one of the following:
writeFile

object (WriteFile)

Represents the write operation.

deleteFile

object (DeleteFile)

Represents the delete operation.

WriteFile

JSON representation
{
  "contents": string
}
Fields
contents

string (bytes format)

The file's contents.

A base64-encoded string.

Output Schema

CommitRepositoryChanges response message.

CommitRepositoryChangesResponse

JSON representation
{
  "commitSha": string
}
Fields
commitSha

string

The commit SHA of the current commit.

Tool Annotations

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