Skip to main content
Glama

ACTION_GLOBAL_KEY

Sends global Android key actions such as Back, Home, Recents, Notifications, Enter, and Delete via Shizuku/root or accessibility, returning key_success for automation workflows.

Instructions

全局按键:返回、桌面、最近任务、通知栏、回车等(需 Shizuku/root 或无障碍(见 key 说明))。输出:key_success。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。

Input Schema

NameRequiredDescriptionDefault
keyYes按键。back/home/recents/notifications:先 shell keyevent,失败退回无障碍;quick_settings/power_dialog:仅无障碍;screenshot_toggle/enter/delete/space/tab:仅 shell
requireNo执行后要求为 true 的变量名(如 click_success),不满足按出错处理
on_errorNo节点出错时:skip=跳过继续(默认),stop=停止整个工作流
node_timeout_msNo单节点超时毫秒,0=不限;默认 30 分钟

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does disclose meaningful behavior: the privilege prerequisite (Shizuku/root or accessibility), a shell-keyevent-then-accessibility fallback chain for the four navigation keys, and which keys are accessibility-only or shell-only. It does not cover failure reporting beyond naming the key_success output variable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Very compact and front-loaded: purpose first, then prerequisite, then output contract, then interpolation note. The nested parenthetical ("(需...(见 key 说明))") is slightly dense but every clause carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, but the description names the return contract (key_success) and the variable-snapshot JSON shape, and it covers prerequisites and per-key channel constraints. The main remaining gap for an agent is disambiguation from ACTION_GLOBAL_NAV.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the per-key channel semantics in the enum description already do the heavy lifting and the baseline is 3. The description adds only marginal meaning beyond the schema in this dimension, namely the ${var} interpolation support and that string params are interpolated.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("全局按键" – press global hardware/navigation keys) and enumerates the supported keys (back/home/recents/notifications/enter). However, it never distinguishes itself from the sibling ACTION_GLOBAL_NAV, which by name sounds like it covers the same navigation-key territory, so an agent cannot route between the two from the description alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Conveys the precondition ("需 Shizuku/root 或无障碍") and, via the key description, which keys work through which channel with fallback ordering. It gives no explicit when-to-use vs when-not guidance and names no alternative tool, so routing between this and ACTION_GLOBAL_NAV remains inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.