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.

Don't use this tool on repositories connected to a remote Git host. To verify, use the get_repository tool. If the git_remote_settings field is present, the repository is connected to a remote host and you must use workspace-based tools such as commit_workspace_changes instead.

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 code sample shows how to use curl to call 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 MCP tool 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

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: ❌