MCP Reference: dataform.googleapis.com

Dataform MCP server provides tools to interact with Dataform.

A Model Context Protocol (MCP) server acts as a proxy between an external service that provides context, data, or capabilities to a Large Language Model (LLM) or AI application. MCP servers connect AI applications to external systems such as databases and web services, translating their responses into a format that the AI application can understand.

Server Setup

You must enable MCP servers and set up authentication before use. For more information about using Google and Google Cloud remote MCP servers, see Google Cloud MCP servers overview.

Server Endpoints

An MCP service endpoint is the network address and communication interface (usually a URL) of the MCP server that an AI application (the Host for the MCP client) uses to establish a secure, standardized connection. It is the point of contact for the LLM to request context, call a tool, or access a resource. Google MCP endpoints can be global or regional.

The Dataform API MCP server has the following global MCP endpoint:

  • https://dataform.googleapis.com/mcp

MCP Tools

An MCP tool is a function or executable capability that an MCP server exposes to a LLM or AI application to perform an action in the real world.

Tools

The dataform.googleapis.com MCP server has the following tools:

MCP Tools
list_repositories

List the Dataform repositories in a given Google Cloud project and location.

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

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.

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}.

read_repository_file

Return the contents of a file that's inside a Dataform repository.

This tool isn't for standard pipeline development. It's intended for direct repository interaction, typically for managing single-file assets such as notebooks or saved queries.

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

The path parameter value is the relative path to the file from the repository root. Valid file paths can be obtained using the query_repository_directory_contents tool.

query_repository_directory_contents

Return the contents of a given Dataform repository directory.

This tool is primarily used to list and manage single-file assets directly in the repository.

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

The path parameter value is the relative path to the directory from the repository root. Valid file paths can be obtained using the query_repository_directory_contents tool.

list_workflow_configs

List the workflow configurations in a given Dataform repository.

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

get_workflow_config

Fetch a single Dataform workflow configuration.

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

create_workflow_config

Create a new workflow configuration in a given Dataform repository.

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

The workflow_config_id is the ID for the workflow configuration.

Prerequisite: A valid ReleaseConfig must exist. The create_workflow_config tool defines the schedule (cron) and credentials for triggering workflow invocations based on that release.

The workflow invocation must be created using a custom service account. You can specify the service account using the invocationConfig.serviceAccount field. The service account can't be the default Dataform service agent. The service account must have the necessary permissions to execute the workflow, and the user must be authorized to act as the selected service account. This authorization is typically granted through the Service Account User (roles/iam.serviceAccountUser) IAM role, which can be granted on the service account itself or on the project that contains it.

update_workflow_config

Update the properties of an existing Dataform workflow configuration, such as its execution schedule (cron), associated release configuration, or invocation overrides.

Modifications to the cron_schedule take effect immediately for all future scheduled executions.

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

The workflow invocation must be created using a custom service account. You can specify the service account using the invocationConfig.serviceAccount field. The service account can't be the default Dataform service agent. The service account must have the necessary permissions to execute the workflow, and the user must be authorized to act as the selected service account. This authorization is typically granted through the Service Account User (roles/iam.serviceAccountUser) IAM role, which can be granted on the service account itself or on the project that contains it.

list_release_configs

List the release configurations in a given Dataform repository.

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

get_release_config

Fetch a single Dataform release configuration.

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

create_release_config

Create a new release configuration in a given Dataform repository.

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

The release_config_id is the user-defined ID for the release configuration. If the user doesn't specify an ID, generate a short, descriptive ID using lowercase letters, numbers, and hyphens based on their request.

update_release_config

Update an existing Dataform release configuration, which serves as a template for automatic code compilation.

Updates to fields like git_commitish change how future compilation results are generated, but such updates don't retroactively alter existing CompilationResult assets.

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

create_compilation_result

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

This tool compiles .sqlx files into executable SQL. Agents need to know that subsequent code changes aren't reflected in this result unless a new compilation is triggered.

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

Agents can validate the compiled SQL by inspecting CompilationResultAction resources and potentially using a BigQuery tool for a dry run.

A valid compilation result is required before triggering a manual workflow invocation using the create_workflow_invocation tool.

Prerequisite: Create a repository using the create_repository tool before calling the create_compilation_result tool.

list_workflow_invocations

List the workflow invocations in a given Dataform repository.

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

create_workflow_invocation

Create a new workflow invocation in a given Dataform repository.

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

Either the compilation_result or the workflow_config parameter value is required.

  • If using compilation_result, the parameter value must be in the format projects/{project_id}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}.
  • If using workflow_config, the parameter value must be in the format projects/{project_id}/locations/{location}/repositories/{repository}/workflowConfigs/{workflow_config}.

Prerequisite: To trigger an invocation, you must first create either a compilation_result using the create_compilation_result tool or a workflow_config using the create_workflow_config tool. You can't trigger an invocation directly from raw repository code.

The workflow invocation must be created using a custom service account. You can specify the service account using the invocationConfig.serviceAccount field. The service account can't be the default Dataform service agent. The service account must have the necessary permissions to execute the workflow, and the user must be authorized to act as the selected service account. This authorization is typically granted through the Service Account User (roles/iam.serviceAccountUser) IAM role, which can be granted on the service account itself or on the project that contains it.

cancel_workflow_invocation

Request the graceful termination of a running Dataform workflow invocation.

This tool sends a cancellation signal to the running workflow. However, any individual BigQuery jobs, table creations, or assertions that have already completed as part of this workflow will not be rolled back.

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

get_compilation_result

Fetch a single Dataform compilation result.

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

query_compilation_actions

Return the compilation result actions for a given Dataform compilation result.

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

query_workflow_invocation_actions

Return the workflow invocation actions for a given Dataform workflow invocation.

These actions represent the individual BigQuery jobs, table creations, or assertions that make up the workflow.

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

get_workflow_invocation

Fetch a single Dataform workflow invocation.

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

Get MCP tool specifications

To get the MCP tool specifications for all tools in an MCP server, use the tools/list method. The following example demonstrates how to use curl to list all tools and their specifications currently available within the MCP server.

Curl Request
                      
curl --location 'https://dataform.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
    "method": "tools/list",
    "jsonrpc": "2.0",
    "id": 1
}'