工具:delete_agent
刪除指定代理程式。
下列範例示範如何使用 curl 叫用 delete_agent 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": "delete_agent", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
輸入內容的結構定義
AgentService.DeleteAgent 的要求訊息。
DeleteAgentRequest
| JSON 表示法 |
|---|
{ "name": string, "force": boolean, "etag": string } |
| 欄位 | |
|---|---|
name |
這是必要旗標,要刪除的代理程式資源名稱。 |
force |
選用。指出是否要強制刪除代理程式,即使其他應用程式/代理程式/範例仍參照該代理程式也一樣。
|
etag |
選用。代理程式目前的 ETag。如果未提供 etag,刪除作業會覆寫任何並行變更。如果提供 ETag,但與代理程式目前的 ETag 不符,系統會封鎖刪除作業,並傳回 ABORTED 錯誤。 |
輸出內容的結構定義
您可以重複使用這個一般空白訊息,避免在 API 中定義重複的空白訊息。常見的例子是將其做為 API 方法的要求或回應類型。例如:
service Foo {
rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
}
工具註解
破壞性提示:✅ | 等冪提示:❌ | 唯讀提示:❌ | 開放世界提示:❌