REST Resource: projects.locations.apps.toolsets

資源:工具集

工具集代表一組可供代理使用的動態管理工具。

JSON 表示法
{
  "name": string,
  "displayName": string,
  "description": string,
  "timeout": string,
  "createTime": string,
  "updateTime": string,
  "etag": string,
  "executionType": enum (ExecutionType),
  "toolFakeConfig": {
    object (ToolFakeConfig)
  },

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "mcpToolset": {
    object (McpToolset)
  },
  "openApiToolset": {
    object (OpenApiToolset)
  },
  "connectorToolset": {
    object (ConnectorToolset)
  }
  // End of mutually exclusive fields.
}
欄位
name

string

ID。工具組的專屬 ID。格式:projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}

displayName

string

選用。工具集的顯示名稱。不得重複用於同一應用程式。

description

string

選用。工具集的說明。

timeout

string (Duration format)

選用。工具集執行作業的逾時時間。如未設定,SYNCHRONOUS 工具集的預設逾時時間為 30 秒,ASYNCHRONOUS 工具集則為 60 秒。

以秒為單位的時間長度,最多 9 個小數位數,結尾為「s」。示例:"3.5s"。

createTime

string (Timestamp format)

僅供輸出。建立工具集的時間戳記。

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

updateTime

string (Timestamp format)

僅供輸出。上次更新工具集的時間戳記。

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

etag

string

ETag 用於確保物件在讀取 - 修改 - 寫入作業期間未變更。如果 etag 為空,更新作業會覆寫任何並行變更。

executionType

enum (ExecutionType)

選用。工具集中工具的執行類型。

toolFakeConfig

object (ToolFakeConfig)

選用。模擬模式中工具行為的設定。

工具組類型。以下列出互斥欄位。回應中最多會設定一個欄位:
mcpToolset

object (McpToolset)

選用。工具集,內含 MCP 伺服器提供的工具清單。

openApiToolset

object (OpenApiToolset)

選用。工具集,內含 OpenAPI 結構定義所定義的工具清單。

connectorToolset

object (ConnectorToolset)

選用。這組工具可從 Integration Connectors 連線產生工具。

互斥欄位的結尾。

McpToolset

工具集,內含 MCP 伺服器提供的工具清單。

JSON 表示法
{
  "serverAddress": string,
  "apiAuthentication": {
    object (ApiAuthentication)
  },
  "serviceDirectoryConfig": {
    object (ServiceDirectoryConfig)
  },
  "tlsConfig": {
    object (TlsConfig)
  },
  "customHeaders": {
    string: string,
    ...
  },
  "toolOverrides": [
    {
      object (McpToolOverride)
    }
  ]
}
欄位
serverAddress

string

這是必要旗標,MCP 伺服器的位址,例如「https://example.com/mcp/」。如果伺服器是使用 MCP SDK 建構,網址應加上「/mcp/」後置字串。僅支援以可串流 HTTP 傳輸為基礎的伺服器。詳情請參閱 https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http。

apiAuthentication

object (ApiAuthentication)

選用。存取工具及針對 MCP 伺服器執行工具時,必須提供驗證資訊。如果是持有人權杖驗證,權杖僅適用於工具執行,不適用於列出工具。這表示工具必須未經授權即可列出。

serviceDirectoryConfig

object (ServiceDirectoryConfig)

選用。VPC-SC 的 Service Directory 設定,用於解析範圍內的服務名稱。

tlsConfig

object (TlsConfig)

選用。TLS 設定。包含用戶端應信任的自訂伺服器憑證。

customHeaders

map (key: string, value: string)

選用。要透過要求傳送至 MCP 伺服器的自訂標頭。值必須採用 $context.variables.<name_of_variable> 格式,且可在工作階段變數中設定。詳情請參閱 https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/open-api#openapi-injection。

包含 "key": value 組合清單的物件,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }。

toolOverrides[]

object (McpToolOverride)

選用。這個工具組中個別工具的覆寫。這樣就能覆寫特定詳細資料 (例如說明、名稱),或固定工具的狀態,避免工具完全動態。

McpToolOverride

與工具集中的特定工具相關聯的覆寫。這項功能可「釘選」或「覆寫」外部動態伺服器的工具定義。

JSON 表示法
{
  "tool": string,
  "nameOverride": string,
  "descriptionOverride": string,
  "snapshot": {
    object (McpToolDefinition)
  }
}
欄位
tool

string

這是必要旗標,MCP 伺服器發出的工具原始名稱。

nameOverride

string

選用。如果存在,這個工具會在代理程式中使用這個名稱,而非原始名稱。如果 MCP 伺服器提供的工具名稱不佳,這項功能主要會做為別名使用。

descriptionOverride

string

選用。如果有的話,這項工具會使用這項說明,而非伺服器提供的原始說明。

snapshot

object (McpToolDefinition)

僅供輸出。如果這個工具存在,就會「固定」,並在伺服器暫時無法使用或沒有覆寫時,使用快照值做為備用值。

McpToolDefinition

工具核心定義元素的容器,可做為快照。快照中的結構定義會照常使用,無法覆寫。

JSON 表示法
{
  "description": string,
  "inputSchema": {
    object (Schema)
  },
  "outputSchema": {
    object (Schema)
  }
}
欄位
description

string

僅供輸出。MCP 工具的說明。這項設定可由 McpToolOverride 中的 descriptionOverride 覆寫。

inputSchema

object (Schema)

僅供輸出。MCP 工具輸入引數的結構定義。

outputSchema

object (Schema)

僅供輸出。MCP 工具輸出引數的結構定義。

OpenApiToolset

工具集,內含 OpenAPI 結構定義所定義的工具清單。

JSON 表示法
{
  "openApiSchema": string,
  "apiAuthentication": {
    object (ApiAuthentication)
  },
  "tlsConfig": {
    object (TlsConfig)
  },
  "serviceDirectoryConfig": {
    object (ServiceDirectoryConfig)
  },
  "ignoreUnknownFields": boolean,
  "url": string
}
欄位
openApiSchema

string

這是必要旗標,工具集的 OpenAPI 結構定義。

apiAuthentication

object (ApiAuthentication)

選用。API 要求的驗證資訊。

tlsConfig

object (TlsConfig)

選用。TLS 設定。包含自訂伺服器憑證

serviceDirectoryConfig

object (ServiceDirectoryConfig)

選用。Service Directory 設定。

ignoreUnknownFields

boolean

選用。如果為 true,對於 OpenAPI 結構定義中定義的所有作業,代理程式都會忽略 API 回應中的不明欄位。

url

string

選用。開放式 API 架構的伺服器網址。如果結構定義包含伺服器網址,則只有在匯出程序期間的環境依附元件中,才會設定這個欄位。在匯入過程中,如果環境依附元件中存在這個網址,且結構定義含有 $env_var 預留位置,系統就會取代結構定義中的預留位置。

ConnectorToolset

這組工具可從 Integration Connectors 連線產生工具。

JSON 表示法
{
  "connection": string,
  "authConfig": {
    object (EndUserAuthConfig)
  },
  "connectorActions": [
    {
      object (Action)
    }
  ]
}
欄位
connection

string

這是必要旗標,所參照 Integration Connectors 連線的完整資源名稱。格式:projects/{project}/locations/{location}/connections/{connection}

authConfig

object (EndUserAuthConfig)

選用。設定 Integration Connectors 處理驗證的方式。根據預設,管理員驗證會傳遞至 Integration Connectors API 要求。您可以透過不同的使用者驗證設定覆寫這項設定。注意:連線必須啟用驗證覆寫功能,才能在此指定 EUC 設定,否則工具集建立作業會失敗。詳情請參閱:https://cloud.google.com/application-integration/docs/configure-connectors-task#configure-authentication-override

connectorActions[]

object (Action)

這是必要旗標,要產生工具的連接器動作/實體作業清單。

方法

create

在指定應用程式中建立新工具集。

delete

刪除指定的工具組。

get

取得指定工具集的詳細資料。

list

列出指定應用程式中的工具集。

patch

更新指定的工具集。

retrieveTools

擷取指定工具集中包含的工具清單。