ToolCall

要求用戶端或代理人執行指定工具。

JSON 表示法
{
  "id": string,
  "displayName": string,
  "args": {
    object
  },
  "parentToolCallId": string,
  "agentName": string,

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "tool": string,
  "toolsetTool": {
    object (ToolsetTool)
  }
  // End of mutually exclusive fields.
}
欄位
id

string

選用。工具呼叫的專屬 ID。如果已填入,用戶端應傳回執行結果,並在 ToolResponse 中提供相符的 ID。

displayName

string

僅供輸出。工具的顯示名稱。

args

object (Struct format)

選用。工具的輸入參數和值,格式為 JSON 物件。

parentToolCallId

string

僅供輸出。如果是由代表父項呼叫的子代理程式發出,則為導致此呼叫的工具呼叫 ID。如果是頂層呼叫,則為空白。讓用戶端將子代理程式的工作歸類在啟動工作的呼叫下,而非將每個步驟都視為同層級。

agentName

string

僅供輸出。發出這通電話的代理名稱 (人類可讀),例如「合約架構師」。如果是由根層級代理發出,則為空白。

要執行的工具 ID。可以是持續性工具,也可以是工具集中的工具。以下列出互斥欄位。回應中最多會設定一個欄位:
tool

string

選用。要執行的工具名稱。格式:projects/{project}/locations/{location}/apps/{app}/tools/{tool}

toolsetTool

object (ToolsetTool)

選用。要執行的工具集工具。

互斥欄位的結尾。