MCP Tools Reference: dataform.googleapis.com

工具:list_workflow_invocations

列出给定 Dataform 代码库中的工作流调用。

parent 参数值必须采用 projects/{project_id}/locations/{location}/repositories/{repository} 格式。

以下代码示例展示了如何使用 curl 调用 list_workflow_invocations MCP 工具。

Curl 请求
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": "list_workflow_invocations",
    "arguments": {
      // Provide these details according to the MCP tool specification.
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'

输入架构

ListWorkflowInvocations 请求消息。

ListWorkflowInvocationsRequest

JSON 表示法
{
  "parent": string,
  "pageSize": integer,
  "pageToken": string,
  "orderBy": string,
  "filter": string
}
字段
parent

string

必需。WorkflowInvocation 类型的父资源。必须采用 projects/*/locations/*/repositories/* 格式。

pageSize

integer

可选。要返回的工作流调用次数上限。服务器返回的项目数量可能少于请求的数量。如果未指定,服务器将选择合适的默认值。

pageToken

string

可选。从之前的 ListWorkflowInvocations 调用接收的页面令牌。利用其进行后续页面检索。

进行分页时,提供给 ListWorkflowInvocations 的所有其他参数(page_size 除外)必须与提供页面令牌的调用匹配。

orderBy

string

可选。此字段仅支持按 name 排序。如果未指定,服务器将选择排序方式。如果指定了此参数,则 name 字段的默认顺序为升序。

filter

string

可选。返回列表的过滤条件。

输出架构

ListWorkflowInvocations 响应消息。

ListWorkflowInvocationsResponse

JSON 表示法
{
  "workflowInvocations": [
    {
      object (WorkflowInvocation)
    }
  ],
  "nextPageToken": string,
  "unreachable": [
    string
  ]
}
字段
workflowInvocations[]

object (WorkflowInvocation)

工作流调用列表。

nextPageToken

string

可作为 page_token 发送并用于检索下一页的令牌。如果省略此字段,则不存在后续页面。

unreachable[]

string

无法到达的位置。

WorkflowInvocation

JSON 表示法
{
  "name": string,
  "invocationConfig": {
    object (InvocationConfig)
  },
  "state": enum (State),
  "invocationTiming": {
    object (Interval)
  },
  "resolvedCompilationResult": string,
  "dataEncryptionState": {
    object (DataEncryptionState)
  },
  "privateResourceMetadata": {
    object (PrivateResourceMetadata)
  },
  "pipelineConfig": {
    object (PipelineConfig)
  },

  // Union field compilation_source can be only one of the following:
  "compilationResult": string,
  "workflowConfig": string
  // End of list of possible types for union field compilation_source.

  // Union field _internal_metadata can be only one of the following:
  "internalMetadata": string
  // End of list of possible types for union field _internal_metadata.
}
字段
name

string

仅限输出。工作流调用的名称。

invocationConfig

object (InvocationConfig)

不可变。如果未设置,系统将使用默认的 InvocationConfig。

state

enum (State)

仅限输出。相应工作流调用的当前状态。

invocationTiming

object (Interval)

仅限输出。相应工作流调用的时间详情。

resolvedCompilationResult

string

仅限输出。用于创建相应调用的已解析编译结果。将采用 projects/*/locations/*/repositories/*/compilationResults/* 格式。

dataEncryptionState

object (DataEncryptionState)

仅限输出。仅当代码库具有 KMS 密钥时才设置。

privateResourceMetadata

object (PrivateResourceMetadata)

仅限输出。表示相应资源是否为用户级范围的元数据。只有当 WorkflowInvocation 资源来自合集结果且合集结果是用户级范围的时,该资源才为 user_scoped。

pipelineConfig

object (PipelineConfig)

仅限输出。用于定义流水线类型和 Git 代码库中路径的流水线选项。

联合字段 compilation_source。要用于此调用的编译结果的来源。compilation_source 只能是下列其中一项:
compilationResult

string

不可变。要用于此调用的编译结果的名称。必须采用 projects/*/locations/*/repositories/*/compilationResults/* 格式。

workflowConfig

string

不可变。要调用的工作流配置的名称。必须采用 projects/*/locations/*/repositories/*/workflowConfigs/* 格式。

联合字段 _internal_metadata。

_internal_metadata 只能是下列其中一项:

internalMetadata

string

仅限输出。用于在内部提供资源的所有元数据信息。例如:时间戳、标志、状态字段等。此字段的格式为 JSON 字符串。

InvocationConfig

JSON 表示法
{
  "includedTargets": [
    {
      object (Target)
    }
  ],
  "includedTags": [
    string
  ],
  "transitiveDependenciesIncluded": boolean,
  "transitiveDependentsIncluded": boolean,
  "fullyRefreshIncrementalTablesEnabled": boolean,
  "serviceAccount": string,

  // Union field _query_priority can be only one of the following:
  "queryPriority": enum (QueryPriority)
  // End of list of possible types for union field _query_priority.
}
字段
includedTargets[]

object (Target)

可选。要包含的一组操作标识符。

includedTags[]

string

可选。要包含的标记集。

transitiveDependenciesIncluded

boolean

可选。如果设置为 true,则会执行所含操作的传递依赖项。

transitiveDependentsIncluded

boolean

可选。如果设置为 true,则会执行所含操作的传递从属项。

fullyRefreshIncrementalTablesEnabled

boolean

可选。如果设置为 true,则任何增量表都将完全刷新。

serviceAccount

string

可选。用于运行工作流调用的服务账号。

联合字段 _query_priority。

_query_priority 只能是下列其中一项:

queryPriority

enum (QueryPriority)

可选。指定 BigQuery 中查询执行的优先级。如需了解详情,请访问 https://cloud.google.com/bigquery/docs/running-queries#queries。

目标

JSON 表示法
{
  "database": string,
  "schema": string,
  "name": string
}
字段
database

string

可选。操作的数据库(Google Cloud 项目 ID)。

schema

string

可选。database 内操作的架构(BigQuery 数据集 ID)。

name

string

可选。操作的名称,位于 database 和 schema 内。

间隔

JSON 表示法
{
  "startTime": string,
  "endTime": string
}
字段
startTime

string (Timestamp format)

可选。时间间隔的开始时间(含)。

如果指定,则与此时间间隔匹配的时间戳必须等于或晚于开始时间。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

endTime

string (Timestamp format)

可选。时间间隔的结束时间(不含)。

如果指定,则与此时间间隔匹配的时间戳必须早于结束时间。

采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

时间戳

JSON 表示法
{
  "seconds": string,
  "nanos": integer
}
字段
seconds

string (int64 format)

表示世界协调时间 (UTC) 的秒数(从 Unix 纪元 1970-01-01T00:00:00Z 开始算起)。必须介于 -62135596800 到 253402300799 之间(含边界值),对应于 0001-01-01T00:00:00Z 到 9999-12-31T23:59:59Z。

nanos

integer

秒数的非负小数部分(以纳秒为单位)。此字段是时长的纳秒部分,而不是秒的替代项。对于含小数部分的负秒数,仍必须包含按时间递升的非负纳秒值。必须在 0 到 999,999,999 之间(含边界值)。

DataEncryptionState

JSON 表示法
{
  "kmsKeyVersionName": string
}
字段
kmsKeyVersionName

string

必需。用于加密资源数据的 KMS 密钥版本名称。

PrivateResourceMetadata

JSON 表示法
{
  "userScoped": boolean
}
字段
userScoped

boolean

仅限输出。如果为 true,则表示相应资源是用户级范围的,即属于工作区或源自工作区。

PipelineConfig

JSON 表示法
{
  "pipelineType": enum (PipelineType),
  "path": string
}
字段
pipelineType

enum (PipelineType)

必需。流水线的类型。

path

string

必需。Git 代码库中定义流水线的相对路径。例如,对于 Dataform 流水线,它是 workflow_settings.yaml 或 dataform.json 所在的文件夹的路径。

QueryPriority

BigQuery 中查询执行的优先级类型。

枚举
QUERY_PRIORITY_UNSPECIFIED 默认值。此值未使用。
INTERACTIVE 查询将在 BigQuery 中以交互式优先级执行。如需了解详情,请访问 https://cloud.google.com/bigquery/docs/running-queries#queries。
BATCH 查询将在 BigQuery 中以批量优先级执行。如需了解详情,请访问 https://cloud.google.com/bigquery/docs/running-queries#batchqueries。

州

表示工作流调用的当前状态。

枚举
STATE_UNSPECIFIED 默认值。此值未使用。
RUNNING 工作流调用目前正在运行。
SUCCEEDED 工作流调用成功。一种终端状态。
CANCELLED 工作流调用已取消。一种终端状态。
FAILED 工作流调用失败。一种终端状态。
CANCELING 工作流调用正在取消,但某些操作仍在运行。

PipelineType

流水线的类型。未来可能会延长。如果为 UNSPECIFIED,则会抛出错误。

枚举
PIPELINE_TYPE_UNSPECIFIED 默认值。此值未使用。
DATAFORM 常规 Dataform 流水线。
SQL SQL 单个文件资产。
NOTEBOOK 笔记本单一文件资产。

工具注释

工具注释会发送给 MCP 客户端,用于描述指定工具的基本风险。大多数客户端会将这些提示视为不受信任的,但它们可用于确定何时向用户发送确认提示。

除了标题字符串之外,还定义了以下布尔值提示:

  • readOnlyHint:如果为 true,则工具不会修改其环境。默认值:false。
  • destructiveHint:如果为 true,则工具可以执行破坏性操作。如果为 false,则该工具只能执行添加操作。默认值:true。
  • idempotentHint:如果为 true,则使用相同实参重复调用该工具不会对其环境产生任何额外影响。默认值:false。
  • openWorldHint:如果为 true,则工具可以与外部实体的“开放世界”进行交互。如果为 false,则该工具只能与内部实体互动。例如,网络搜索工具是开放世界工具,而内存工具不是开放世界工具。

破坏性提示:❌ | 等幂性提示:✅ | 只读提示:✅ | 开放世界提示:❌