MCP Tools Reference: Android Device Management MCP Server

工具:get_web_app

获取 Web 应用。需要采用以下格式的资源名称: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
}'
                

输入架构

请求获取 Web 应用。

GetWebAppRequest

JSON 表示法
{
  "name": string
}
字段
name

string

Web 应用的名称,格式为 enterprises/{enterpriseId}/webApps/{packageName}

输出架构

Web 应用。

WebApp

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

string

Web 应用的名称,由服务器在创建期间生成,格式为 enterprises/{enterpriseId}/webApps/{packageName}

title

string

向用户显示的 Web 应用的标题(例如,在其他应用的列表中或作为图标的标签)。

startUrl

string

启动网址,即用户打开应用时应加载的网址。

icons[]

object (WebAppIcon)

Web 应用的图标列表。必须至少包含一个元素。

displayMode

enum (DisplayMode)

Web 应用的显示模式。

versionCode

string (int64 format)

应用的当前版本。

请注意,在 Web 应用的生命周期内,版本可能会自动增加,因为 Google 会进行内部清理,以确保 Web 应用保持最新状态。

WebAppIcon

JSON 表示法
{
  "imageData": string
}
字段
imageData

string

以 base64url 编码的字符串形式表示的图片的实际字节(请参阅 RFC4648 第 5 条“使用网址和文件名安全字母表进行 Base 64 编码”)。

  • 图片类型可以是 PNG 或 JPG。
  • 图片最好为正方形。
  • 图片的大小最好为 512x512。

工具注释

破坏性提示:❌ | 等幂性提示:✅ | 只读提示:✅ | 开放世界提示:❌