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 ( |
| Fields | |
|---|---|
name |
Required. The repository's name. |
commitMetadata |
Required. The changes to commit to the repository. |
requiredHeadCommitSha |
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 |
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 |
CommitMetadata
| JSON representation |
|---|
{
"author": {
object ( |
| Fields | |
|---|---|
author |
Required. The commit's author. |
commitMessage |
Optional. The commit's message. |
CommitAuthor
| JSON representation |
|---|
{ "name": string, "emailAddress": string } |
| Fields | |
|---|---|
name |
Required. The commit author's name. |
emailAddress |
Required. The commit author's email address. |
FileOperationsEntry
| JSON representation |
|---|
{
"key": string,
"value": {
object ( |
| Fields | |
|---|---|
key |
|
value |
|
FileOperation
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field operation. The operation to perform on the file. operation can be only one of the following: |
|
writeFile |
Represents the write operation. |
deleteFile |
Represents the delete operation. |
WriteFile
| JSON representation |
|---|
{ "contents": string } |
| Fields | |
|---|---|
contents |
The file's contents. A base64-encoded string. |
Output Schema
CommitRepositoryChanges response message.
CommitRepositoryChangesResponse
| JSON representation |
|---|
{ "commitSha": string } |
| Fields | |
|---|---|
commitSha |
The commit SHA of the current commit. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ❌ | Read Only Hint: ❌ | Open World Hint: ❌