Skip to main content
Glama

get_local_datetime_info

Retrieve current local datetime and timezone information to support astronomical calculations for celestial object tracking.

Instructions

Retrieve the current datetime and timezone.

Returns: Dict with keys "data", "_meta". "data" contains "current_time" (ISO string).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_local_datetime_info' tool. It retrieves the current local datetime and timezone info, formats it, and returns it as a structured response.
    @mcp.tool()
    def get_local_datetime_info() -> Dict[str, Any]:
        """
        Retrieve the current datetime and timezone.
    
        Returns:
            Dict with keys "data", "_meta". "data" contains "current_time" (ISO string).
        """
        tz = get_localzone()
        current_time = datetime.datetime.now(tz)
        return format_response({
            "current_time": current_time.isoformat()
        })
  • src/main.py:10-10 (registration)
    Import statement in main.py that loads the time/impl.py module, triggering the @mcp.tool() decorator to register the 'get_local_datetime_info' tool with the MCP server instance.
    import src.functions.time.impl
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 states what the tool returns (a dict with specific keys) but doesn't mention whether this is a read-only operation, if it requires authentication, or if there are rate limits. It provides basic output structure but lacks deeper behavioral context.

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 perfectly concise and well-structured: a clear purpose statement followed by return format details. Every sentence earns its place with no wasted words, and the information is front-loaded appropriately for quick understanding.

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 simplicity (zero parameters, has output schema), the description is reasonably complete. It explains what the tool does and what it returns, though it could benefit from more behavioral context (like whether it's read-only or has any limitations). The output schema existence reduces the need for detailed return value explanation.

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 zero parameters (schema coverage 100%), so the description doesn't need to explain any inputs. The baseline for zero parameters is 4, as there's no parameter information to add beyond what the schema already indicates (no properties).

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 with specific verbs ('retrieve') and resources ('current datetime and timezone'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_celestial_pos' or 'get_weather_by_position' that also provide time-related data, which prevents a perfect score.

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. With siblings like 'get_celestial_pos' that might include timezone data, there's no indication of when this specific datetime retrieval is preferred or what its limitations are, leaving usage context unclear.

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/StarGazer1995/mcp-stargazing'

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