ToolCall

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

JSON 表示法
{
  "id": string,
  "displayName": string,
  "args": {
    object
  },
  "parentToolCallId": string,
  "agentName": string,
  "targetApp": 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

僅供輸出。發出這項呼叫的代理人類可讀名稱,例如「Contract Architect」。如果是由根層級代理發出,則為空白。

targetApp

string

僅供輸出。這項呼叫指定的應用程式,由助理從呼叫的資源引數衍生:應用程式資源名稱、位置範圍工具的 PROJECT,或工作階段本機工具的空白。僅在專案範圍的助理工作階段中設定。

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

string

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

toolsetTool

object (ToolsetTool)

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

互斥欄位結束。