Skip to main content
Glama

set_location

Define mock GPS coordinates on a connected Android or iOS device to test delivery routes, location-based flows, and navigation scenarios.

Instructions

Set the device's mock GPS location. Essential for testing delivery/route flows. Android: emulator only (adb emu geo fix). iOS: simulators (simctl location) and physical devices via idb.

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": {
      "latitude": "<latitude>",
      "longitude": "<longitude>"
    },
    "name": "set_location"
  }
}

Input Schema

NameRequiredDescriptionDefault
latitudeYesLatitude in decimal degrees (e.g. -34.6037 for Buenos Aires)
platformNoTarget platform. Inferred if omitted.
device_idNoDevice ID. Omit for the connected device.
longitudeYesLongitude in decimal degrees (e.g. -58.3816 for Buenos Aires)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only but non-destructive mutation, so the safety bar is partly covered. The description adds genuinely useful behavior beyond that: the supported platform/host matrix and the underlying mechanisms (adb emu geo fix, simctl location, idb), which directly affect whether the call can work. It stops short of stating whether the mock location persists across app restarts 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?

Three short, front-loaded sentences: purpose first, then use case, then platform constraints. Every sentence carries information an agent needs and none is redundant with the schema or annotations.

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

Completeness4/5

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

For a four-parameter mutation with no output schema and fully documented parameters, the definition covers purpose, primary use case, and platform prerequisites. The remaining gap is lifecycle behavior — whether the mock location persists and whether a separate call clears it — which matters for a location-spoofing tool but is a minor omission overall.

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%, with latitude/longitude ranges, decimal-degree format, examples, platform enum, and device_id omission semantics all documented in the schema. The description adds no parameter-level meaning (e.g., what device_id looks like, or platform inference rules) beyond that, so the baseline 3 applies.

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

Purpose4/5

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

The description gives a specific verb and resource ('Set the device's mock GPS location'), which an agent can immediately distinguish from state-setting siblings like set_appearance or set_network_state. It does not explicitly name or disambiguate against any alternative tool, but the resource is narrow enough that confusion is unlikely.

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

Usage Guidelines4/5

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

'Essential for testing delivery/route flows' supplies a concrete usage context, and the platform matrix ('Android: emulator only... iOS: simulators and physical devices via idb') functions as a real when-not constraint that determines whether the call can succeed at all. There is no mention of alternatives or how to reset the location afterwards, so exclusions are present but the alternative path is not.

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