Skip to main content
Glama
rahulkr
by rahulkr

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
NameRequiredDescriptionDefault
latitudeYes
longitudeYes
device_serialNo

Implementation Reference

  • 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)

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