MCP Tools Reference: ces.googleapis.com

工具:run_evaluation

執行 CES 應用程式的評估作業

下列範例示範如何使用 curl 叫用 run_evaluation 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": "run_evaluation",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

輸入內容的結構定義

McpService.RunEvaluation 的要求訊息。

RunEvaluationRequest

JSON 表示法
{
  "app": string,
  "evaluations": [
    string
  ],
  "evaluationDataset": string,
  "displayName": string,
  "appVersion": string
}
欄位
app

string

要執行評估的應用程式資源名稱。格式:projects/{project}/locations/{location}/apps/{app}

evaluations[]

string

要執行的評估 ID 清單。

evaluationDataset

string

用於執行的評估資料集 ID。

displayName

string

評估執行的顯示名稱。

appVersion

string

用於評估作業的應用程式版本。

輸出內容的結構定義

這個資源表示屬於網路 API 呼叫結果的長時間執行作業。

作業

JSON 表示法
{
  "name": string,
  "metadata": {
    "@type": string,
    field1: ...,
    ...
  },
  "done": boolean,

  // Union field result can be only one of the following:
  "error": {
    object (Status)
  },
  "response": {
    "@type": string,
    field1: ...,
    ...
  }
  // End of list of possible types for union field result.
}
欄位
name

string

伺服器指派的名稱,而且只有在當初傳回這個名稱的服務中是不重複項目。如果您使用預設的 HTTP 對應,則 name 應該是以 operations/{unique_id} 結尾的資源名稱。

metadata

object

與作業相關聯的服務專屬中繼資料,通常包含進度資訊和常用中繼資料 (例如建立時間)。部分服務可能不會提供這類中繼資料。凡是會傳回長時間執行作業的方法,都應記錄中繼資料類型 (如有)。

包含任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。例如 { "id": 1234, "@type": "types.example.com/standard/id" }

done

boolean

如果值為 false,代表作業仍在執行中。如果值為 true,代表作業已完成,系統會顯示 errorresponse 的執行結果。

聯集欄位 result。這是作業的執行結果,可能為 error,或是有效的 response。如果 done == false,系統不會將結果設定為 errorresponse。如果 done == true,系統只能將結果設定為 errorresponse。部分服務可能不會提供結果。result 只能是下列其中一個設定:
error

object (Status)

作業失敗或取消時顯示的錯誤結果。

response

object

作業執行成功時的一般回應。如果原始方法在執行成功時沒有傳回資料 (例如 Delete),則回應為 google.protobuf.Empty。如果原始方法是標準的 Get/Create/Update,回應則應該為資源。如果是其他方法,回應必須包含類型 XxxResponse,其中 Xxx 是原始方法的名稱。舉例來說,如果原始方法的名稱為 TakeSnapshot(),您就能推測出回應類型應該是 TakeSnapshotResponse

包含任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。範例:{ "id": 1234, "@type": "types.example.com/standard/id" }

不限

JSON 表示法
{
  "typeUrl": string,
  "value": string
}
欄位
typeUrl

string

使用 URI 參照識別序列化 Protobuf 訊息的類型,該參照包含以斜線結尾的前置字串和完整合格的類型名稱。

範例:type.googleapis.com/google.protobuf.StringValue

這個字串至少須包含一個 / 字元,且最後一個 / 後的內容必須是正規形式的類型完整名稱,且開頭不得有半形句號。請勿在這些 URI 參照中寫入配置,以免用戶端嘗試與其聯絡。

前置字元是任意的,Protobuf 實作項目應會直接去除最後一個 / 之前的所有內容,以識別類型。type.googleapis.com/ 是部分舊版實作項目要求的常見預設前置字串。這個前置字串不會指出型別的來源,且包含該前置字串的 URI 不會回應任何要求。

所有型別網址字串都必須是合法的 URI 參照,且參照內容只能包含英數字元、百分比編碼逸出字元,以及下列集合中的字元 (不含外側的反引號):/-.~_!$&()*+,;=。雖然我們允許百分比編碼,但實作時不應取消逸出,以免與現有剖析器混淆。舉例來說,系統應拒絕 type.googleapis.com%2FFoo

Any 的原始設計中,我們曾考慮在這些型別網址啟動型別解析服務,但 Protobuf 從未實作這項服務,且認為聯絡這些網址有問題,可能造成安全性問題。請勿嘗試聯絡類型網址。

value

string (bytes format)

保存 type_url 所描述類型的 Protobuf 序列化。

Base64 編碼字串。

狀態

JSON 表示法
{
  "code": integer,
  "message": string,
  "details": [
    {
      "@type": string,
      field1: ...,
      ...
    }
  ]
}
欄位
code

integer

狀態碼,應為 google.rpc.Code 的列舉值。

message

string

向開發人員顯示的錯誤訊息,應以英文呈現。所有面向使用者的錯誤訊息都應經過本地化,並透過 google.rpc.Status.details 欄位傳送,或是由用戶端加以本地化。

details[]

object

包含錯誤詳細資料的訊息清單。這是供 API 使用的一組常用訊息類型。

包含任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。範例:{ "id": 1234, "@type": "types.example.com/standard/id" }

工具註解

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