LongPressTool

class LongPressTool(context: Context) : McpTool

long_press — dispatch a long-press gesture (a held stroke via tapPath) at the given screen coordinates and await completion.

Params: required x, y (screen pixels; non-negative, non-NaN); duration_ms (optional hold, clamped 100–5000ms, default 800).

On success returns success = true, x, y, duration_ms. Error codes: accessibility_not_enabled (service not bound), invalid_coords (non-numeric / negative / NaN), gesture_failed (dispatch cancelled or rejected).

Constructors

Link copied to clipboard
constructor(context: Context)

Properties

Link copied to clipboard
open override val annotations: ToolAnnotations
Link copied to clipboard
open override val description: String
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val parameters: List<ToolParameter>

Functions

Link copied to clipboard
open suspend override fun execute(params: Map<String, Any>): ToolResult