Skip to main content
Glama

Get Timezone

get_timezone
Read-onlyIdempotent

Look up the IANA timezone name, current local time, and UTC offset (hours) for a given latitude and longitude via TimeAPI.io. Requires coordinates — does not accept city names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latitudeYesLatitude
longitudeYesLongitude

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
timezoneYesIANA timezone name
local_timeYesCurrent local time in ISO format
utc_offset_hoursYesUTC offset in hours (may include decimal for minutes)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / utc_offset_hours / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
  2. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "latitude": 40.7128,
      +    "longitude": -74.006
      +  },
      +  {
      +    "latitude": 51.5074,
      +    "longitude": -0.1278
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "local_time": {
      +      "description": "Current local time in ISO format",
      +      "type": "string"
      +    },
      +    "timezone": {
      +      "description": "IANA timezone name",
      +      "type": "string"
      +    },
      +    "utc_offset_hours": {
      +      "description": "UTC offset in hours (may include decimal for minutes)",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "timezone",
      +    "local_time",
      +    "utc_offset_hours"
      +  ],
      +  "type": "object"
      +}
  3. Changed2 schema fields changed
    • removedInput schema / examples
      Removed value: -[
      -  {
      -    "_apiKey": "your-geonames-api-key",
      -    "lat": 40.7128,
      -    "lng": -74.006
      -  }
      -]
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "country_code": {
      -      "description": "ISO country code",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "country_name": {
      -      "description": "Full country name",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "current_time": {
      -      "description": "Current local time at location",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "dst_offset": {
      -      "description": "Daylight saving time offset",
      -      "type": [
      -        "number",
      -        "null"
      -      ]
      -    },
      -    "gmt_offset": {
      -      "description": "Current GMT offset in hours",
      -      "type": [
      -        "number",
      -        "null"
      -      ]
      -    },
      -    "latitude": {
      -      "description": "Latitude coordinate",
      -      "type": "number"
      -    },
      -    "longitude": {
      -      "description": "Longitude coordinate",
      -      "type": "number"
      -    },
      -    "raw_offset": {
      -      "description": "Raw offset from GMT",
      -      "type": [
      -        "number",
      -        "null"
      -      ]
      -    },
      -    "sunrise": {
      -      "description": "Sunrise time",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "sunset": {
      -      "description": "Sunset time",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "timezone_id": {
      -      "description": "IANA timezone identifier",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    }
      -  },
      -  "required": [
      -    "timezone_id",
      -    "gmt_offset",
      -    "raw_offset",
      -    "dst_offset",
      -    "current_time",
      -    "sunrise",
      -    "sunset",
      -    "country_code",
      -    "country_name",
      -    "latitude",
      -    "longitude"
      -  ],
      -  "type": "object"
      -}New value: +null
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "country_code": {
      +      "description": "ISO country code",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "country_name": {
      +      "description": "Full country name",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "current_time": {
      +      "description": "Current local time at location",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "dst_offset": {
      +      "description": "Daylight saving time offset",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "gmt_offset": {
      +      "description": "Current GMT offset in hours",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "latitude": {
      +      "description": "Latitude coordinate",
      +      "type": "number"
      +    },
      +    "longitude": {
      +      "description": "Longitude coordinate",
      +      "type": "number"
      +    },
      +    "raw_offset": {
      +      "description": "Raw offset from GMT",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "sunrise": {
      +      "description": "Sunrise time",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "sunset": {
      +      "description": "Sunset time",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "timezone_id": {
      +      "description": "IANA timezone identifier",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "timezone_id",
      +    "gmt_offset",
      +    "raw_offset",
      +    "dst_offset",
      +    "current_time",
      +    "sunrise",
      +    "sunset",
      +    "country_code",
      +    "country_name",
      +    "latitude",
      +    "longitude"
      +  ],
      +  "type": "object"
      +}
  5. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "_apiKey": "your-geonames-api-key",
      +    "lat": 40.7128,
      +    "lng": -74.006
      +  }
      +]
  6. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering safety. The description adds context beyond that by identifying the external service (TimeAPI.io) and specifying the exact output fields. It does not disclose error behavior for invalid coordinate ranges, but for a simple read-only lookup this is a minor gap.

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?

Two sentences with no filler. The first sentence front-loads the action, resource, and output; the second adds a crucial constraint. Every word earns its place.

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?

The tool is simple, has a strong annotation set, includes schema examples, and an output schema exists. The description covers the core return values, the external API, and the input constraint. Missing details like coordinate-range validation or API error handling are minor given the available structured metadata.

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 basic descriptions ('Latitude', 'Longitude') and concrete examples. The description reinforces that the parameters must be coordinates and adds the negative constraint about city names, but it does not provide valid ranges or formatting details. Since the schema already carries the heavy lifting, a baseline of 3 is appropriate.

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?

Description states a specific verb ('Look up'), a precise resource (IANA timezone name, current local time, UTC offset), and the input type (latitude/longitude). It also differentiates itself from geocoding siblings by explicitly stating it does not accept city names, so an agent can distinguish it from tools like geocode or reverse_geocode.

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?

The description gives a clear usage condition: 'Requires coordinates — does not accept city names.' This tells the agent when to use this tool (when lat/lng are available) and when not to (city names). It does not name alternative tools explicitly, but the constraint is sufficient to route an agent correctly in most cases.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.