set_location
Set GPS coordinates on Android emulators for testing location-based features in development and QA workflows.
Instructions
Set GPS location (works on emulators)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| latitude | Yes | ||
| longitude | Yes | ||
| device_serial | No |
Implementation Reference
- src/adb_mcp_server/server.py:1105-1114 (handler)The main handler function for the 'set_location' tool. It is decorated with @mcp.tool(), which likely handles both registration and schema definition via type hints. Executes ADB command to set GPS location on an Android emulator.@mcp.tool() def set_location( latitude: float, longitude: float, device_serial: str | None = None ) -> str: """Set GPS location (works on emulators)""" return run_adb([ "emu", "geo", "fix", str(longitude), str(latitude) ], device_serial)