Skip to main content
Glama
rahulkr
by rahulkr

swipe

Simulate touch gestures on Android devices by swiping between specified coordinates for UI testing and automation.

Instructions

Swipe from start to end coordinates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_xYes
start_yYes
end_xYes
end_yYes
duration_msNo
device_serialNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary handler for the 'swipe' tool. Executes ADB shell input swipe command with provided coordinates and duration. Registered via @mcp.tool() decorator which handles schema from type hints.
    @mcp.tool()
    def swipe(
        start_x: int, 
        start_y: int, 
        end_x: int, 
        end_y: int, 
        duration_ms: int = 300,
        device_serial: str | None = None
    ) -> str:
        """Swipe from start to end coordinates"""
        return run_adb([
            "shell", "input", "swipe",
            str(start_x), str(start_y),
            str(end_x), str(end_y),
            str(duration_ms)
        ], device_serial)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action but doesn't reveal critical traits: whether this requires device access, if it's a simulated or physical swipe, what happens on failure, or any side effects. For a tool with 6 parameters and no annotations, this is a significant gap in transparency.

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 a single, efficient sentence that directly states the action. It's front-loaded with the core purpose and wastes no words. However, it's overly terse given the tool's complexity, bordering on under-specification rather than optimal conciseness.

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

Completeness2/5

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

Given the tool has 6 parameters, no annotations, and sibling tools with overlapping functions, the description is incomplete. It doesn't address behavioral context, parameter details, or usage scenarios. While an output schema exists (which might help with return values), the description alone leaves too many gaps for effective tool selection and invocation.

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

Parameters2/5

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

Schema description coverage is 0%, meaning none of the 6 parameters have descriptions in the schema. The tool description adds no parameter semantics beyond implying start and end coordinates. It doesn't explain units (e.g., pixels), the optional duration_ms, or device_serial for multi-device contexts. With low coverage, the description fails to compensate adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Swipe from start to end coordinates' clearly states the action (swipe) and the resource (coordinates), making the purpose understandable. However, it doesn't differentiate this tool from similar sibling tools like 'scroll_down', 'scroll_up', or 'long_press', which also involve screen interactions. The description is specific but lacks sibling differentiation.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention context like UI testing, app navigation, or how it differs from other touch-based tools in the sibling list. There's no explicit or implied usage context, leaving the agent to guess based on the tool name alone.

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/rahulkr/r_adb_mcp_server'

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