Skip to main content
Glama

adb_screen

Control Android screen state: wake, sleep, toggle, lock, or unlock devices, including PIN-protected keyguard unlock with verification.

Instructions

Control screen state: wake, sleep, toggle, lock, or unlock. Lock and unlock verify actual keyguard state via dumpsys window. Unlock uses wm dismiss-keyguard (works for swipe keyguards); supply 'pin' to perform the full PIN entry sequence for PIN-protected devices: wakes screen, dismisses keyguard, swipes up to reveal keypad, types PIN, confirms with ENTER, and verifies the keyguard sleep token was released.

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": {
      "action": "<action>"
    },
    "name": "adb_screen"
  }
}

Input Schema

NameRequiredDescriptionDefault
pinNoPIN/password to enter when unlock encounters an active keyguard (digits only for PIN, alphanumeric for password). Only used with action='unlock'.
actionYesScreen action — one of: wake (power on + dismiss keyguard if no PIN), sleep (power off), toggle (flip current state), lock (force keyguard), unlock (dismiss keyguard, with PIN if supplied)
deviceNoDevice serial

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.6
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed2 schema fields changedv1.1.3
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / action / description
      Previous value: -"Screen action"New value: +"Screen action — one of: wake (power on + dismiss keyguard if no PIN), sleep (power off), toggle (flip current state), lock (force keyguard), unlock (dismiss keyguard, with PIN if supplied)"
  3. First observedv1.1.1

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 a good job: it discloses the underlying mechanism (dumpsys window keyguard verification, wm dismiss-keyguard), spells out the multi-step PIN sequence, and states the final verification of the keyguard sleep token being released. Missing pieces are failure behavior (wrong PIN, timeout), latencies, and any device/authorization prerequisites.

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?

The action list is front-loaded in the first sentence and the detailed mechanics follow, which is the right ordering. The PIN-sequence run-on sentence is dense but each clause describes a distinct step, so little is wasted.

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 three-parameter mutation tool with no output schema and no annotations, the description covers the per-action semantics, the verification mechanism, and the escalation path via pin. What remains thin is what happens on failed unlock or invalid PIN and whether the tool reports the resulting keyguard state.

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 all three parameters already carry their own descriptions, setting the baseline at 3. The description restates the pin-only-with-unlock constraint that the schema already states, though it does add value by explaining what supplying a pin actually triggers step by step.

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 opens with a specific verb+resource ('Control screen state') and enumerates every supported action (wake, sleep, toggle, lock, unlock), so an agent knows exactly what the tool does. However, it never distinguishes itself from the sibling tool adb_screen_state, which by name appears to overlap heavily, leaving ambiguity about which to pick.

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 gives useful conditional guidance for one parameter path ('supply pin to perform the full PIN entry sequence for PIN-protected devices') and notes unlock via wm dismiss-keyguard only works for swipe keyguards, which implicitly tells the agent when unlock alone is insufficient. But there is no explicit when-to-use vs adb_screen_state, adb_input_text for entering a PIN, or any statement of when not to use this tool.

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

Deploy Server

Other Tools