MCP Reference: maintenance.googleapis.com

Model Context Protocol (MCP) 伺服器可做為代理伺服器,在外部服務與大型語言模型 (LLM) 或 AI 應用程式之間傳遞脈絡、資料或功能。MCP 伺服器可將 AI 應用程式連結至資料庫和 Web 服務等外部系統,並將系統回覆轉換成 AI 應用程式可理解的格式。

伺服器設定

您必須先啟用 MCP 伺服器設定驗證,才能使用這項功能。如要進一步瞭解如何使用 Google 和 Google Cloud 遠端 MCP 伺服器,請參閱 Google Cloud MCP 伺服器總覽

伺服器端點

MCP 服務端點是 MCP 伺服器的網路位址和通訊介面 (通常是網址),AI 應用程式 (MCP 用戶端的主機) 會使用這個端點建立安全標準連線。這是 LLM 請求情境、呼叫工具或存取資源的聯絡點。Google MCP 端點可以是全域或區域性。

維護 API MCP 伺服器具有下列全域 MCP 端點:

  • https://maintenance.googleapis.com/mcp

MCP 工具

MCP 工具是 MCP 伺服器向 LLM 或 AI 應用程式公開的函式或可執行功能,可在現實世界中執行動作。

工具

maintenance.googleapis.com MCP 伺服器提供下列工具:

MCP 工具
list_resource_maintenances

列出指定專案和位置的資源維護作業。

參數

  • parent (字串,必填):資源維護作業的父項,格式為 projects/{project}/locations/{location}
  • page_size (整數,選填):每頁要傳送的資源維護作業數量上限。
  • page_token (字串,選用):接收自前一個 ListResourceMaintenances 呼叫的頁面權杖。
  • filter (字串,選用):按照 https://google.aip.dev/160 的規定篩選清單。
  • order_by (字串,選用):按照 https://google.aip.dev/132 中指定的順序排列結果。

傳回值

這個方法會傳回 ListResourceMaintenancesResponse 物件,其中包含:

  • resource_maintenances:符合要求條件的資源維護作業清單。
  • next_page_token:可做為後續要求中的 page_token 傳送的權杖,用於擷取下一頁結果。

注意事項

  • 如要查看所有區域的全球檢視畫面,請使用「-」做為位置。
get_resource_maintenance

擷取特定資源維護作業的詳細資料。

參數

  • name (字串,必填):服務內資源的資源名稱,格式為 projects/{project}/locations/{location}/resourceMaintenances/{resource_maintenance_id}

傳回值

如果找到,則為 ResourceMaintenance 資源物件。

summarize_maintenances

提供匯總統計資料,總結指定專案和位置的維護作業。

參數

  • parent (字串,必填):資源維護作業的父項,格式為 projects/{project}/locations/{location}
  • page_size (整數,選填):每頁要傳送的資源維護作業數量上限。
  • page_token (字串,選用):接收自前一個 SummarizeMaintenances 呼叫的頁面權杖。
  • filter (字串,選用):按照 https://google.aip.dev/160 的規定篩選清單。
  • order_by (字串,選用):按照 https://google.aip.dev/132 中指定的順序排列結果。

傳回值

這個方法會傳回 SummarizeMaintenancesResponse 物件,其中包含:

  • maintenances:維護摘要清單。
  • next_page_token:可做為後續要求中的 page_token 傳送的權杖,用於擷取下一頁結果。

注意事項

  • 如要查看所有區域的全球摘要,請使用「-」做為位置。

取得 MCP 工具規格

如要取得 MCP 伺服器中所有工具的 MCP 工具規格,請使用 tools/list 方法。以下範例說明如何使用 curl 列出 MCP 伺服器中目前可用的所有工具及其規格。

Curl 要求
                      
curl --location 'https://maintenance.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
    "method": "tools/list",
    "jsonrpc": "2.0",
    "id": 1
}'