Skip to main content
Glama

android_press_key

Destructive

Press navigation, input, or media keys on an Android device. Home and back work via Accessibility; other keys require authorized Shizuku.

Instructions

Press a named navigation/input/media key. Home/back use Accessibility; other key events require explicitly-authorized Shizuku.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the mutation risk is covered. The description adds valuable behavioral context beyond annotations by disclosing the two execution mechanisms (Accessibility vs Shizuku) and the authorization requirement.

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?

Two short sentences with no filler. The core action is front-loaded, and the important authorization caveat is delivered in the second sentence without redundancy.

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 single-parameter tool with a self-explanatory enum and annotations covering safety, the description is nearly complete: it states what the tool does and the prerequisite for use. It does not describe return values or detailed side effects, but the tool's low complexity and lack of output schema reduce the need for that.

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 0%, so the description must compensate for the bare enum. It adds meaning by classifying the key as navigation/input/media and by explaining that home/back behave differently from the other keys in terms of required authorization.

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 concrete action ('Press') and a specific resource ('a named navigation/input/media key'), which is immediately distinguishable from coordinate-based touch tools like android_tap, android_swipe, and android_double_tap. The key enum further pins down exactly what can be pressed.

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?

The description gives clear usage context: press a named key, with Home/back using Accessibility and all other keys requiring explicitly authorized Shizuku. It does not explicitly name alternative tools or say when not to use this tool, but the authorization caveat is practical routing guidance.

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