Skip to main content
Glama
invidtiv
by invidtiv

Send a keyevent on the device

android.input.keyevent

Send keycode events to Android devices for remote control, using scrcpy protocol when available or ADB as fallback. Simulate actions like HOME, BACK, VOLUME, POWER, and ENTER.

Instructions

Sends a keycode event. Uses fast scrcpy control protocol when stream is active, otherwise falls back to adb shell input keyevent. Common keycodes: HOME=3, BACK=4, VOLUME_UP=24, VOLUME_DOWN=25, POWER=26, ENTER=66, DELETE=67.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serialYes
keycodeYes
Behavior4/5

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

With no annotations provided, the description carries full burden and adds valuable behavioral context: it discloses the dual protocol implementation (fast scrcpy when stream active, adb shell otherwise), which affects performance and availability. However, it doesn't mention error conditions, permissions needed, or what happens if the device is locked.

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 sentences with zero waste: the first states purpose and implementation details, the second provides critical parameter guidance with examples. Every element serves a clear purpose, and key information is front-loaded.

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 2-parameter tool with no annotations and no output schema, the description is quite complete: it explains the action, implementation behavior, and provides parameter examples. The main gap is lack of explicit error handling or success indication, but it covers most essential context given the tool's complexity.

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

Parameters5/5

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

With 0% schema description coverage for both parameters, the description compensates fully by explaining the 'keycode' parameter with concrete examples (HOME=3, BACK=4, etc.), providing essential semantic meaning beyond the bare integer type in the schema. The 'serial' parameter's device identification purpose is implied by context.

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?

The description clearly states the specific action ('Sends a keycode event') and resource ('on the device'), distinguishing it from sibling input tools like android.input.tap or android.input.text. It precisely defines the tool's function without being tautological.

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?

The description implies usage context by mentioning fallback protocols (fast scrcpy vs adb shell), but doesn't explicitly state when to use this tool versus alternatives like android.input.tap for touch events or android.input.text for text input. No clear exclusions or sibling comparisons are provided.

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/invidtiv/mcp-scrcpy-vision'

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