Skip to main content
Glama

Get Timezone

get_timezone
Read-onlyIdempotent

Get timezone information for a latitude/longitude location. Returns timezone ID, GMT offset, DST offset, current local time, sunrise, and sunset. Example: get_timezone(40.7128, -74.0060) for New York.

Input Schema

NameRequiredDescriptionDefault
latYesLatitude (e.g., 40.7128)
lngYesLongitude (e.g., -74.0060)
_apiKeyYesGeoNames username

Output Schema

NameRequiredDescriptionDefault
sunsetYesSunset time
sunriseYesSunrise time
latitudeYesLatitude coordinate
longitudeYesLongitude coordinate
dst_offsetYesDaylight saving time offset
gmt_offsetYesCurrent GMT offset in hours
raw_offsetYesRaw offset from GMT
timezone_idYesIANA timezone identifier
country_codeYesISO country code
country_nameYesFull country name
current_timeYesCurrent local time at location

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "_apiKey": "your-geonames-api-key",
      -    "lat": 40.7128,
      -    "lng": -74.006
      -  }
      -]New value: +[
      +  {
      +    "lat": 40.7128,
      +    "lng": -74.006
      +  }
      +]
  2. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is covered by structured data. The description adds the returned fields, but omits behavior an agent might care about — that a GeoNames username (_apiKey) is required and that responses may depend on an external open-world service. With annotations carrying most of the load, a 3 is appropriate.

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 sentences: purpose first, return values second, concrete example last. Every sentence carries information and nothing is padded.

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 simple three-parameter read-only lookup with an output schema and full annotation coverage, the description gives an agent everything needed to call it correctly. It slightly redundantly restates return fields already covered by the output schema, and doesn't mention the external GeoNames dependency, keeping it from a 5.

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% (lat, lng, and _apiKey all documented), so baseline is 3. The description reinforces parameter ordering via the concrete example get_timezone(40.7128, -74.0060), which is a modest value-add but not new semantic detail beyond the schema.

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 ('Get timezone information for a latitude/longitude location') and enumerates exactly what comes back (timezone ID, GMT/DST offsets, local time, sunrise, sunset). The resource is clearly distinct from geographic siblings like get_nearby, find_postal_codes, and search_geonames.

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 coordinate-based input implies when to reach for this tool, and the New York example clarifies the call shape. However, it never states when NOT to use it or names an alternative sibling (e.g., search_geonames for name-based lookup), so the routing guidance is only implied.

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.