MCP Tools Reference: ces.googleapis.com

工具:get_toolset

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

下列範例示範如何使用 curl 叫用 get_toolset MCP 工具。

Curl 要求
                  
curl --location 'https://ces.[REGION].rep.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "get_toolset",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

輸入內容的結構定義

AgentService.GetToolset 的要求訊息。

GetToolsetRequest

JSON 表示法
{
  "name": string
}
欄位
name

string

這是必要旗標,要擷取的工具集資源名稱。

輸出內容的結構定義

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

工具集

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

  // Union field toolset_type can be only one of the following:
  "mcpToolset": {
    object (McpToolset)
  },
  "openApiToolset": {
    object (OpenApiToolset)
  },
  "connectorToolset": {
    object (ConnectorToolset)
  }
  // End of list of possible types for union field toolset_type.
}
欄位
name

string

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

displayName

string

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

description

string

選用。工具集的說明。

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)

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

聯集欄位 toolset_type。工具集類型。toolset_type 只能是下列其中一個設定:
mcpToolset

object (McpToolset)

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

openApiToolset

object (OpenApiToolset)

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

connectorToolset

object (ConnectorToolset)

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

McpToolset

JSON 表示法
{
  "serverAddress": string,
  "apiAuthentication": {
    object (ApiAuthentication)
  },
  "serviceDirectoryConfig": {
    object (ServiceDirectoryConfig)
  },
  "tlsConfig": {
    object (TlsConfig)
  }
}
欄位
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) 設定。包含用戶端應信任的自訂伺服器憑證。

ApiAuthentication

JSON 表示法
{

  // Union field auth_config can be only one of the following:
  "apiKeyConfig": {
    object (ApiKeyConfig)
  },
  "oauthConfig": {
    object (OAuthConfig)
  },
  "serviceAgentIdTokenAuthConfig": {
    object (ServiceAgentIdTokenAuthConfig)
  },
  "serviceAccountAuthConfig": {
    object (ServiceAccountAuthConfig)
  },
  "bearerTokenConfig": {
    object (BearerTokenConfig)
  }
  // End of list of possible types for union field auth_config.
}
欄位
聯集欄位 auth_config。驗證設定。auth_config 只能是下列其中一個設定:
apiKeyConfig

object (ApiKeyConfig)

選用。API 金鑰驗證的設定。

oauthConfig

object (OAuthConfig)

選用。OAuth 的設定。

serviceAgentIdTokenAuthConfig

object (ServiceAgentIdTokenAuthConfig)

選用。從 CES 服務代理程式產生的 ID 權杖驗證設定。

serviceAccountAuthConfig

object (ServiceAccountAuthConfig)

選用。服務帳戶驗證的設定。

bearerTokenConfig

object (BearerTokenConfig)

選用。不記名權杖驗證的設定。

ApiKeyConfig

JSON 表示法
{
  "keyName": string,
  "apiKeySecretVersion": string,
  "requestLocation": enum (RequestLocation)
}
欄位
keyName

string

這是必要旗標,API 金鑰的參數名稱或標頭名稱。例如:如果 API 要求是「https://example.com/act?X-Api-Key=」,則「X-Api-Key」就是參數名稱。

apiKeySecretVersion

string

這是必要旗標,儲存 API 金鑰的 SecretManager 密鑰版本資源名稱。格式:projects/{project}/secrets/{secret}/versions/{version}

注意:您應將 roles/secretmanager.secretAccessor 角色授予 CES 服務代理人 service-<PROJECT-NUMBER>@gcp-sa-ces.iam.gserviceaccount.com

requestLocation

enum (RequestLocation)

這是必要旗標,要求中的金鑰位置。

OAuthConfig

JSON 表示法
{
  "oauthGrantType": enum (OauthGrantType),
  "clientId": string,
  "clientSecretVersion": string,
  "tokenEndpoint": string,
  "scopes": [
    string
  ]
}
欄位
oauthGrantType

enum (OauthGrantType)

這是必要旗標,OAuth 授權類型。

clientId

string

這是必要旗標,OAuth 供應商提供的用戶端 ID。

clientSecretVersion

string

這是必要旗標,儲存用戶端密鑰的 SecretManager 密鑰版本資源名稱。格式:projects/{project}/secrets/{secret}/versions/{version}

注意:您應將 roles/secretmanager.secretAccessor 角色授予 CES 服務代理人 service-<PROJECT-NUMBER>@gcp-sa-ces.iam.gserviceaccount.com

tokenEndpoint

string

這是必要旗標,OAuth 供應商中的權杖端點,用於交換存取權杖。

scopes[]

string

選用。要授予的 OAuth 範圍。

ServiceAccountAuthConfig

JSON 表示法
{
  "serviceAccount": string,
  "scopes": [
    string
  ]
}
欄位
serviceAccount

string

這是必要旗標,用於驗證的服務帳戶電子郵件地址。CES 會使用這個服務帳戶交換存取權杖,然後在要求的 Authorization 標頭中傳送存取權杖。

服務帳戶必須將 roles/iam.serviceAccountTokenCreator 角色授予 CES 服務代理程式 service-<PROJECT-NUMBER>@gcp-sa-ces.iam.gserviceaccount.com

scopes[]

string

選用。要授予的 OAuth 範圍。如未指定,則會使用預設範圍 https://www.googleapis.com/auth/cloud-platform

BearerTokenConfig

JSON 表示法
{
  "token": string
}
欄位
token

string

這是必要旗標,不記名權杖。格式必須為 $context.variables.<name_of_variable>

ServiceDirectoryConfig

JSON 表示法
{
  "service": string
}
欄位
service

string

這是必要旗標,Service Directory 服務的名稱。格式:projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}。服務目錄的位置必須與應用程式的位置相同。

TlsConfig

JSON 表示法
{
  "caCerts": [
    {
      object (CaCert)
    }
  ]
}
欄位
caCerts[]

object (CaCert)

這是必要旗標,指定允許用於 HTTPS 驗證的自訂 CA 憑證清單。

CaCert

JSON 表示法
{
  "displayName": string,
  "cert": string
}
欄位
displayName

string

這是必要旗標,允許使用的自訂 CA 憑證名稱。這可用於消除自訂 CA 憑證的歧義。

cert

string (bytes format)

這是必要旗標,用於 HTTPS 驗證的允許自訂 CA 憑證 (DER 格式)。這會覆寫預設的 SSL 信任儲存區。如為空白或未指定,CES 會使用 Google 的預設信任儲存區驗證憑證。注意:請確認 HTTPS 伺服器憑證是以「主體替代名稱」簽署。舉例來說,您可以使用下列指令自行簽署憑證: openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")

Base64 編碼字串。

OpenApiToolset

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

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)

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

EndUserAuthConfig

JSON 表示法
{

  // Union field auth_config can be only one of the following:
  "oauth2AuthCodeConfig": {
    object (Oauth2AuthCodeConfig)
  },
  "oauth2JwtBearerConfig": {
    object (Oauth2JwtBearerConfig)
  }
  // End of list of possible types for union field auth_config.
}
欄位
聯集欄位 auth_config。驗證設定。auth_config 只能是下列其中一個設定:
oauth2AuthCodeConfig

object (Oauth2AuthCodeConfig)

Oauth 2.0 授權碼驗證。

oauth2JwtBearerConfig

object (Oauth2JwtBearerConfig)

JWT 設定檔 OAuth 2.0 授權授予驗證。

Oauth2AuthCodeConfig

JSON 表示法
{
  "oauthToken": string
}
欄位
oauthToken

string

這是必要旗標,要傳遞的 OAuth 權杖參數名稱。格式必須為 $context.variables.<name_of_variable>

Oauth2JwtBearerConfig

JSON 表示法
{
  "issuer": string,
  "subject": string,
  "clientKey": string
}
欄位
issuer

string

這是必要旗標,要傳遞的發卡機構參數名稱。格式必須為 $context.variables.<name_of_variable>

subject

string

這是必要旗標,要傳遞的主體參數名稱。格式必須為 $context.variables.<name_of_variable>

clientKey

string

這是必要旗標,要傳遞的用戶端參數名稱。格式必須為 $context.variables.<name_of_variable>

動作

JSON 表示法
{
  "inputFields": [
    string
  ],
  "outputFields": [
    string
  ],

  // Union field action_spec can be only one of the following:
  "connectionActionId": string,
  "entityOperation": {
    object (EntityOperation)
  }
  // End of list of possible types for union field action_spec.
}
欄位
inputFields[]

string

選用。做為作業輸入內容的實體欄位。如未指定任何欄位,系統會使用實體的所有欄位。

outputFields[]

string

選用。要從作業傳回的實體欄位。如未指定任何欄位,系統會傳回實體的所有欄位。

聯集欄位 action_spec。工具要使用的動作設定規格。action_spec 只能是下列其中一個設定:
connectionActionId

string

工具要使用的「連線」動作 ID。

entityOperation

object (EntityOperation)

工具要使用的實體作業設定。

EntityOperation

JSON 表示法
{
  "entityId": string,
  "operation": enum (OperationType)
}
欄位
entityId

string

這是必要旗標,實體的 ID。

operation

enum (OperationType)

這是必要旗標,要在實體上執行的作業。

時間戳記

JSON 表示法
{
  "seconds": string,
  "nanos": integer
}
欄位
seconds

string (int64 format)

代表自 Unix 紀元 1970-01-01T00:00:00Z 起算的世界標準時間秒數。必須介於 -62135596800 和 253402300799 之間 (含),對應至 0001-01-01T00:00:00Z 至 9999-12-31T23:59:59Z。

nanos

integer

以奈秒為單位的非負秒數小數。這個欄位是時間長度的奈秒部分,並非秒數的替代值。如果第二個值為負數,且包含分數,奈秒值仍須為非負數,且會向前計時。必須介於 0 至 999,999,999 之間 (含)。

ToolFakeConfig

JSON 表示法
{
  "enableFakeMode": boolean,

  // Union field tool_response can be only one of the following:
  "codeBlock": {
    object (CodeBlock)
  }
  // End of list of possible types for union field tool_response.
}
欄位
enableFakeMode

boolean

選用。工具是否使用模擬模式。

聯集欄位 tool_response。回應可以是靜態,也可以由 Python 函式提供。tool_response 只能是下列其中一個設定:
codeBlock

object (CodeBlock)

選用。要執行的程式碼區塊,而非實際的工具呼叫。

CodeBlock

JSON 表示法
{
  "pythonCode": string
}
欄位
pythonCode

string

這是必要旗標,在工具模擬模式中呼叫的 Python 程式碼。預期的 Python 函式簽章 - 如要擷取所有工具呼叫: def fake_tool_call(tool: Tool, input: dict[str, Any], callback_context: CallbackContext) -> Optional[dict[str, Any]]: 如要擷取特定工具呼叫: def fake_{tool_id}(tool: Tool, input: dict[str, Any], callback_context: CallbackContext) -> Optional[dict[str, Any]]: 如果函式傳回 None,系統會改為叫用實際工具。

工具註解

破壞性提示:❌ | 等冪提示:✅ | 唯讀提示:✅ | 開放世界提示:❌