Skip to main content
Glama
kukapay

whattimeisit-mcp

what_time_is_it

Get the current time based on your IP address using World Time API. This tool provides accurate local time information for your location.

Instructions

Returns the current time string based on the client's IP using World Time API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:9-26 (handler)
    The handler function for the 'what_time_is_it' tool. It is decorated with @mcp.tool(), which registers the tool. Fetches the current datetime from World Time API using the client's IP address and returns it as a string, with error handling.
    @mcp.tool()
    async def what_time_is_it() -> str:
        """Returns the current time string based on the client's IP using World Time API."""
        url = "https://worldtimeapi.org/api/ip"  # World Time API endpoint for IP-based time
        async with httpx.AsyncClient() as client:
            try:
                # Make an asynchronous GET request to the API
                response = await client.get(url)
                # Raise an exception if the HTTP request fails
                response.raise_for_status()
                # Extract and return only the 'datetime' field from the JSON response
                return response.json()["datetime"]
            except httpx.HTTPStatusError as e:
                # Handle HTTP errors and return an error message
                return f"Error: Failed to fetch time - {str(e)}"
            except Exception as e:
                # Handle unexpected errors and return an error message
                return f"Error: Unexpected issue - {str(e)}"
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool returns a time string based on the client's IP using a specific API, which gives some context about data sources and output format. However, it does not disclose important behavioral traits such as rate limits, error handling, network dependencies, or whether the operation is read-only or has side effects.

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, efficient sentence that directly states the tool's purpose and method. It is front-loaded with the key action ('Returns') and avoids any unnecessary details or redundancy, making it highly concise and well-structured.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It explains what the tool does and the method used, but lacks details on output format (e.g., timezone, string format), error cases, or API limitations. Without an output schema, the description should ideally specify the return value more clearly, but it does provide some context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and the schema description coverage is 100% (though empty). The description does not need to add parameter semantics since there are no parameters. A baseline score of 4 is appropriate for a tool with no parameters, as the description adequately covers the tool's function without parameter-related gaps.

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 clearly states the tool's purpose: 'Returns the current time string based on the client's IP using World Time API.' It specifies the verb ('Returns'), resource ('current time string'), and method ('based on the client's IP using World Time API'). However, there are no sibling tools to differentiate from, so it cannot achieve a perfect 5.

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. It does not mention any prerequisites, limitations, or specific contexts for usage. Without sibling tools, it cannot provide explicit alternatives, but it also lacks any implied usage context beyond the basic purpose.

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/kukapay/whattimeisit-mcp'

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