Skip to main content
Glama

Stay awake

stay_awake
Idempotent

Keeps an Android device’s screen on while charging during automated sessions, preventing black screenshots or coordinate failures caused by the display sleeping between steps.

Instructions

Keep the display from dozing during a driving session (svc power stayon true) — the fix when screenshots keep coming back black with screen_off:true because the device sleeps between steps (common on emulators with a short timeout). enabled=true holds the screen on while charging (emulators always are); enabled=false restores the normal timeout. describe_ui works regardless, but any screenshot/coordinate flow needs the screen on.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "enabled": "<enabled>"
    },
    "name": "stay_awake"
  }
}

Input Schema

NameRequiredDescriptionDefault
serialNoTarget device serial (adb -s). Optional when exactly one device is attached.
enabledYestrue = keep the screen on while charging (svc power stayon true); false = restore the normal display timeout.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only cover safety (non-destructive, idempotent, closed-world); the description adds the actual mechanism, the caveat that hold-on only applies while charging and that emulators always are, and the precise blast radius (screenshots and coordinate flows, not describe_ui). It stops short of saying whether the setting persists after the session or across reboots, which is the one remaining behavioral unknown for a persisted device setting.

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?

Front-loaded with the core action and the failure mode it fixes, and every clause carries information. The single dense paragraph with two parentheticals is slightly overloaded compared with a clean two-sentence split, but there is no filler.

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

Completeness5/5

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

For a two-parameter toggle with a fully described schema, no output schema, and annotations covering safety and idempotency, nothing an agent needs in order to decide to call it is missing. The symptom-to-fix mapping and the describe_ui exemption are exactly the context that would otherwise be missing.

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 both parameters are already documented and the baseline is 3. The description's restatement of enabled matches the schema; the only marginal addition is the note that emulators are always charging, which tells the agent the 'while charging' condition will in practice be satisfied.

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

Purpose5/5

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

States a specific verb and resource ('Keep the display from dozing during a driving session') and names the underlying command (svc power stayon true). It also distinguishes itself from neighbors by naming describe_ui as the thing that does not need it and screenshot/coordinate flows as the thing that does.

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

Usage Guidelines5/5

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

Gives a concrete triggering symptom ('screenshots keep coming back black with screen_off:true'), a diagnosis (device sleeps between steps, common on emulators with short timeouts), and explicit direction for both argument values including when to turn it back off. It also carves out the case where the tool is unnecessary (describe_ui).

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