Skip to main content
Glama

stay_awake

Prevent the Android device display from sleeping during automated sessions, solving black screenshots caused by the screen turning off 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.

Input Schema

TableJSON 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.
Behavior5/5

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

With no annotations provided, the description fully carries the behavioral transparency burden. It discloses that enabled=true holds screen on while charging (emulators always are), enabled=false restores normal timeout, and that describe_ui works regardless but screenshot/coordinate flows need screen on. No behavioral surprises.

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?

Three dense sentences with zero waste. First sentence states purpose and motivation in a memorable 'fix when' pattern, second explains the two states, third clarifies edge case (describe_ui unaffected). Perfectly front-loaded.

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?

Given two simple parameters (one boolean, one optional string), no output schema, and no annotations, the description is completely sufficient. It explains why you need it, what it does in each state, and which sibling tools are unaffected. No gaps remain.

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 baseline is 3. The description adds context around the enabled parameter (explaining what true/false does in terms of svc power stayon and timeout restoration) and the serial parameter is self-explanatory from schema. No additional nuance beyond schema, so score remains at baseline.

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?

Description clearly states the tool keeps the display awake during a driving session, links to black screenshots and device sleep, and distinguishes between enabled=true and enabled=false behaviors. The phrase 'the fix when screenshots keep coming back black' provides concrete motivation, and 'describe_ui works regardless' clarifies scope.

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

Usage Guidelines4/5

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

Explicitly states when to use this tool (when screenshots return black with screen_off:true, device sleeps between steps, common on emulators with short timeout). No explicit alternatives or when-not-to-use are mentioned, but the description implies it's needed for any screenshot/coordinate flow that requires screen on.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/iksnerd/adb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server