Skip to main content
Glama

ACTION_SCREEN_WAKE

Controls Android screen power and unlock state for automation workflows: wake, sleep, or wake and unlock with an optional alphanumeric password.

Instructions

亮屏、息屏、亮屏并解锁(sleep 和解锁需 Shizuku 或 root;wake 无 shell 时退回 WakeLock)。输出:screen_wake_success。wake_and_unlock 不核对是否真的解锁(按键序列发完即算成功);图案锁解不了。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。

Input Schema

NameRequiredDescriptionDefault
actionYeswake=亮屏;sleep=息屏;wake_and_unlock=亮屏后发菜单键划开锁屏,给了 password 再输入并回车
requireNo执行后要求为 true 的变量名(如 click_success),不满足按出错处理
on_errorNo节点出错时:skip=跳过继续(默认),stop=停止整个工作流
passwordNo可选:wake_and_unlock 的锁屏密码,只能是 1-64 位字母数字(格式不对整个节点直接失败)
node_timeout_msNo单节点超时毫秒,0=不限;默认 30 分钟

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does substantial work: it discloses the WakeLock fallback when no shell is available, that wake_and_unlock does not verify the screen actually unlocked (it counts success as soon as the key sequence is sent), that pattern locks are unsupported, that the returned variable is screen_wake_success, and that results come back as a variable snapshot JSON. Remaining gaps are minor — no statement about timing/asynchronous delivery of the result or behavior when the screen is already on.

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

Conciseness5/5

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

It is two compact clauses: the three modes with their permission requirements first, then caveats and output. Every sentence carries new information — the fallback behavior, the non-verification caveat, the pattern-lock limitation, the return value, and interpolation — with no restatement of the tool name or filler. There is a stray doubled full stop at the end, a trivial cosmetic issue.

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?

For a mutation tool with five parameters, no annotations and no output schema, the description covers the essential unknowns: permission requirements, the failure mode of wake_and_unlock, the limitation that could cause silent wrong behavior (pattern lock), and the name/shape of the returned value. It is nearly complete; only the timing of when screen_wake_success becomes observable and the no-op case of waking an already-on screen are unaddressed.

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

Parameters4/5

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

Schema description coverage is 100%, so the per-parameter meanings of action, password, require, on_error and node_timeout_ms are already documented, and the baseline would be 3. The description adds information the schema does not contain: that string parameters support ${var} interpolation and that results are returned as a variable snapshot JSON, which changes how an agent should write call arguments. It does not add anything new about the password format (already in schema), so it stops short of 5.

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?

The description names a concrete verb+resource set — 亮屏 (wake), 息屏 (sleep), 亮屏并解锁 (wake and unlock) — that maps directly to the three action enum values, so an agent knows exactly what capability this tool exposes. It is clearly distinct from the state-query sibling ACTION_GET_SCREEN_STATE, though the description never explicitly names that sibling or any other to contrast against, which keeps it at 4 rather than 5.

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?

It states prerequisites for each mode (sleep and unlock require Shizuku or root; wake falls back to WakeLock without shell) and notes that pattern locks cannot be unlocked, which does guide mode selection. What is missing is explicit routing advice — nothing tells the agent to prefer ACTION_GET_SCREEN_STATE to check state first, or when wake+unlock should be used versus ACTION_SWIPE / ACTION_GLOBAL_KEY. Usage is therefore implied rather than prescribed.

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