Get current traveler location

Read a recent traveler location already supplied to the GoVisit page, including accuracy, timestamp, and source when available. It expires after five minutes.

What it returns

This is an explicit, read-only browser-context read. It never prompts for permission or infers a location from the current page. Treat missing, denied, unavailable, or stale results as unknown; the published position expires after five minutes.

For the full current contract and linked context, see the WebMCP manifest and the WebMCP overview.

WebMCP

Input schema
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
Output schema
{
  "type": "object",
  "properties": {
    "schemaVersion": {
      "const": "1"
    },
    "completeness": {
      "type": "string"
    },
    "error": {
      "type": "string"
    },
    "data": {
      "type": "object",
      "properties": {
        "status": {
          "enum": [
            "available",
            "needs-permission",
            "permission-denied",
            "unavailable",
            "stale",
            "loading",
            "invalid-input"
          ]
        },
        "coordinates": {
          "type": "object",
          "properties": {
            "latitude": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            },
            "longitude": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          "required": [
            "latitude",
            "longitude"
          ],
          "additionalProperties": false
        },
        "accuracyMeters": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        },
        "observedAt": {
          "type": "string",
          "format": "date-time"
        },
        "provenance": {
          "enum": [
            "host",
            "user-supplied",
            "browser-geolocation"
          ]
        }
      },
      "required": [
        "status"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "schemaVersion",
    "data"
  ]
}

This tool is available only through WebMCP on GoVisit pages that register it.

const modelContext = document.modelContext;
if (!modelContext) throw new Error("This browser does not expose WebMCP on this page.");
const tool = (await modelContext.getTools()).find((entry) => entry.name === 'get_current_location');
if (!tool) throw new Error('get_current_location is not registered for the current page.');
const result = await modelContext.executeTool(tool, {});
console.log(result);

Registration is page-scoped. Check getTools() before calling.

Last updated: November 7, 2026