Skip to main content
Glama

Tap the screen

android_tap

Tap or long-press an Android screen at specified pixel coordinates. Use coordinates from android_dump_ui to interact with UI elements.

Instructions

Tap at a screen coordinate.

Get coordinates from android_dump_ui, which returns a ready-to-use centre point for every element. Coordinates are in device pixels and depend on the current rotation, so re-read the UI after rotating.

Args:

  • x (number): horizontal position in pixels

  • y (number): vertical position in pixels

  • serial (string, optional): target device

  • long_press (boolean): hold instead of tapping (default: false)

  • duration_ms (number): hold duration when long_press is set (default: 600)

Returns: { "tapped": [number, number], "longPress": boolean, "serial": string }

Examples:

  • Use when: android_dump_ui reported a button at (540, 1683) -> x=540, y=1683

  • Use when: opening a context menu -> long_press=true

  • Don't use when: you do not know where the element is (call android_dump_ui first)

Error Handling:

  • Coordinates outside the screen are silently ignored by Android; verify with android_dump_ui afterwards

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesHorizontal pixel coordinate.
yYesVertical pixel coordinate.
serialNoDevice serial from android_list_devices. Optional when exactly one device is connected; required when several are.
long_pressNoHold instead of a quick tap.
duration_msNoHold duration for a long press.
Behavior5/5

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

Annotations state readOnlyHint=false, destructiveHint=false, openWorldHint=true, and idempotentHint=false, but the description adds critical behavioral details: 'Coordinates outside the screen are silently ignored by Android' and 'verify with android_dump_ui afterwards.' It also explains the effect of long_press and duration. No contradiction with annotations.

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 description is well-structured with sections for Args, Returns, Examples, and Error Handling. It is concise and each section earns its place, though the Args section partially repeats schema information. Overall, it's efficient and easy to parse.

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?

For a tool with 5 parameters and no output schema, the description fully covers return format, usage examples, prerequisite steps (android_dump_ui), and error handling. It leaves no significant gaps for an agent to successfully invoke the tool.

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 covers 100% of parameters, so baseline is 3, but the description adds valuable meaning beyond the schema: coordinates are in 'device pixels' and 'depend on the current rotation,' and android_dump_ui returns 'ready-to-use centre point' for elements. This helps the agent choose correct coordinate values, going slightly beyond the schema's basic descriptions.

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 begins with 'Tap at a screen coordinate,' using a specific verb and resource that clearly defines the action. It distinguishes itself from sibling tools like android_swipe (swipe) and android_dump_ui (reading UI) by focusing on the tap action and coordinate input.

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

Usage Guidelines5/5

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

Provides explicit when-to-use guidance: 'Get coordinates from android_dump_ui' and examples like 'Use when: opening a context menu -> long_press=true' and 'Don't use when: you do not know where the element is.' It also warns about re-reading UI after rotation, offering clear context and exclusions.

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/jjs03111/android-build-mcp'

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