Skip to main content
Glama
stadiamaps

Stadia Maps Location API MCP Server

time-and-zone-info

Retrieve current time, timezone, and UTC offset for any geographic coordinates. Provides IANA TZID, active offsets, and RFC 2822 timestamp.

Instructions

Get the current time and zone info at any point (geographic coordinates). Output includes includes the standard UTC offset, special offset currently in effect (typically but not always Daylight Saving Time), IANA TZID, and the current timestamp in RFC 28222 format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latYesThe latitude of the point.
lonYesThe longitude of the point.

Implementation Reference

  • The handler function `timeAndZoneInfo` that performs timezone lookup using Stadia Maps GeospatialApi and returns formatted text output including TZID, offsets, and local time.
    export async function timeAndZoneInfo({
      lat,
      lon,
    }: Coordinates): Promise<CallToolResult> {
      return handleToolError(
        async () => {
          const res = await miscApi.tzLookup({
            lat,
            lng: lon,
          });
    
          return {
            content: [
              {
                type: "text",
                text: [
                  `TZID: ${res.tzId}`,
                  `Standard UTC offset: ${res.baseUtcOffset}`,
                  `Special offset (e.g. DST): ${res.dstOffset}`,
                  `Current time (RFC 2822): ${res.localRfc2822Timestamp}`,
                ].join("\n"),
              },
            ],
          };
        },
        {
          contextMessage: "Timezone lookup failed",
          enableLogging: true,
        },
      );
    }
  • Zod input schemas for latitude and longitude parameters used in the tool's input validation.
    export const latitudeSchema = z
      .number()
      .min(-90)
      .max(90)
      .describe("The latitude of the point.");
    
    export const longitudeSchema = z
      .number()
      .min(-180)
      .max(180)
      .describe("The longitude of the point.");
  • TypeScript type definition for Coordinates used as parameter type in the handler function.
    export type Coordinates = {
      lat: number;
      lon: number;
    };
  • src/index.ts:37-45 (registration)
    Registration of the "time-and-zone-info" tool using McpServer.tool, specifying name, description, input schema, and handler reference.
    server.tool(
      "time-and-zone-info",
      "Get the current time and zone info at any point (geographic coordinates). Output includes includes the standard UTC offset, special offset currently in effect (typically but not always Daylight Saving Time), IANA TZID, and the current timestamp in RFC 28222 format.",
      {
        lat: latitudeSchema,
        lon: longitudeSchema,
      },
      timeAndZoneInfo,
    );
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the output format (UTC offset, special offset, IANA TZID, RFC 28222 timestamp) but doesn't mention error handling, rate limits, authentication needs, or whether this is a read-only operation. It adds some context but lacks comprehensive behavioral details.

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?

The description is a single, well-structured sentence that efficiently conveys the tool's purpose and output details without unnecessary words. It's front-loaded with the core function and provides essential information concisely, with every element earning 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?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is reasonably complete. It explains what the tool does and what it returns, but could benefit from more behavioral context like error cases or usage constraints. Without an output schema, the description adequately covers the return values.

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?

The schema description coverage is 100%, with clear descriptions for both lat and lon parameters. The description doesn't add any parameter-specific semantics beyond what the schema already provides, such as explaining coordinate systems or precision. This meets the baseline for high schema coverage.

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?

The description clearly states the specific action ('Get the current time and zone info') and the resource ('at any point (geographic coordinates)'), distinguishing it from sibling tools like geocode or route-overview which handle different geographic functions. It precisely defines what the tool does without being vague or tautological.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like bulk-geocode or isochrone, nor does it mention any prerequisites or exclusions. While the purpose is clear, there's no explicit context for usage relative to sibling tools, leaving the agent to infer based on tool names alone.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/stadiamaps/stadiamaps-mcp-server-ts'

If you have feedback or need assistance with the MCP directory API, please join our Discord server