Skip to main content
Glama
1999AZZAR

scrcpy-mcp

by 1999AZZAR

key_event

Send Android key events remotely. Pass keycodes like HOME, BACK, ENTER, or VOLUME_UP to trigger device actions—no physical input required. Controls the connected device through ADB and scrcpy.

Instructions

Send a key event to the device. Supports keycodes like HOME, BACK, ENTER, VOLUME_UP, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoAlias for keycode
serialNoDevice serial number
keycodeNoKeycode name (e.g., 'HOME', 'BACK') or numeric value

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesHuman-readable description of the action performed
successYesWhether the input action was dispatched to the device
Behavior3/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, so the mutation aspect is already covered. The description adds that it supports string or numeric keycodes, which is useful beyond the schema. However, it doesn't disclose behavioral details like whether the event waits for device responsiveness, whether unsupported keycodes produce errors, or interaction with the open-worldHint (e.g., custom keycodes).

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?

Single sentence that is efficient and front-loaded with the primary action. The example keycodes add practical value without bloat. Could arguably be slightly richer, but is appropriately concise for its purpose.

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

Completeness3/5

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

Complexity is low-moderate (3 params, none required). The description covers the essential purpose and key examples. With an output schema present, return-value explanation isn't needed. However, given the volume of sibling input tools (tap, swipe, type_text, long_press), a single sentence is arguably thin for disambiguation, and it doesn't address the key-vs-keycode alias ambiguity.

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 description coverage is 100%, so the schema already documents all 3 parameters (key, serial, keycode). The description adds examples of valid key values but doesn't explain the relationship between 'key' and 'keycode' aliases or clarify whether both can be provided simultaneously. Baseline 3 is appropriate given full schema coverage.

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 clearly states it sends a key event to the device, with a specific verb+resource. It provides concrete examples of keycodes (HOME, BACK, ENTER, VOLUME_UP) that clarify what kinds of keys are supported. It doesn't fully distinguish from siblings like tap, swipe, or input_text, but the keycode-based nature is implied clearly enough.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this vs alternatives like tap, input_text, or app controls. The description doesn't say 'for physical/navigation keys' or contrast with other input methods. Usage context is only implied by the examples given, with no exclusions or alternative tool references.

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/1999AZZAR/scrcpy-mcp'

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