MCP Tools Reference: Android Device Management MCP Server

工具:get_web_app

取得網路應用程式。資源名稱格式必須為:enterprises/{enterpriseId}/webApps/{webAppId}。

以下範例示範如何使用 curl 叫用 get_web_app MCP 工具。

Curl 要求
                  
curl --location 'https://androidmanagement.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "get_web_app",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

輸入內容的結構定義

要求取得網頁應用程式。

GetWebAppRequest

JSON 表示法
{
  "name": string
}
欄位
name

string

網頁應用程式的名稱,格式為 enterprises/{enterpriseId}/webApps/{packageName}

輸出內容的結構定義

網頁應用程式。

WebApp

JSON 表示法
{
  "name": string,
  "title": string,
  "startUrl": string,
  "icons": [
    {
      object (WebAppIcon)
    }
  ],
  "displayMode": enum (DisplayMode),
  "versionCode": string
}
欄位
name

string

網頁應用程式的名稱,由伺服器在建立期間以 enterprises/{enterpriseId}/webApps/{packageName} 格式產生。

title

string

向使用者顯示的網頁應用程式標題 (例如在其他應用程式清單中,或做為圖示的標籤)。

startUrl

string

啟動網址,也就是使用者開啟應用程式時應載入的網址。

icons[]

object (WebAppIcon)

網頁應用程式的圖示清單,至少要有一個元素。

displayMode

enum (DisplayMode)

網頁應用程式的顯示模式。

versionCode

string (int64 format)

應用程式的目前版本。

請注意,在網頁應用程式的生命週期內,版本可能會自動增加,而 Google 會進行內部整理,確保網頁應用程式保持在最新狀態。

WebAppIcon

JSON 表示法
{
  "imageData": string
}
欄位
imageData

string

圖片的實際位元組,以 base64url 編碼字串表示 (請參閱 RFC4648 第 5 節「網址和檔案名稱安全字母的 Base 64 編碼」)。

  • 圖片類型可以是 PNG 或 JPG。
  • 圖片最好是正方形。
  • 圖片大小最好是 512 x 512。

工具註解

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