Skip to main content
Glama

Set location

set_location
Idempotent

Sets mock GPS coordinates on an Android device or emulator via adb for testing location-gated features.

Instructions

Set the emulator's mock GPS location (longitude, latitude) — for location-gated features.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "longitude": "<longitude>",
      "latitude": "<latitude>"
    },
    "name": "set_location"
  }
}

Input Schema

NameRequiredDescriptionDefault
serialNoTarget device serial (adb -s). Optional when exactly one device is attached.
latitudeYesLatitude of the mock GPS fix.
longitudeYesLongitude of the mock GPS fix.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare non-destructive, idempotent, and non-open-world behavior. The description adds that this is a mock location on the emulator, but does not disclose whether it requires an emulator/root, whether the fix persists across reboots, or how to clear it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single compact sentence, front-loaded with the verb and resource, with no redundant or wasted wording.

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

Completeness3/5

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

For a simple three-parameter mutation, the description plus rich schema and annotations are largely sufficient, but it omits how to revert/clear the mock location and whether the emulator-only constraint is absolute.

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

Parameters3/5

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

Schema description coverage is 100%, so latitude/longitude/serial are fully documented in the schema; the description only repeats the tuple, adding no ordering or format guidance beyond what is already structured.

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?

States a specific verb and resource ('Set the emulator's mock GPS location') with the exact values affected, and distinguishes it clearly from sibling set_* tools like set_battery and set_sensor by naming the resource.

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

Usage Guidelines3/5

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

The phrase 'for location-gated features' gives a usage context, but there is no explicit when-to-use/when-not guidance, no mention of alternatives (e.g., using real device location), and no prerequisite notes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.