Skip to main content
Glama
andybrandt

MCP Simple Timeserver

Get Local Time and Timezone

get_local_time
Read-only

Retrieve current local time and timezone details from your machine to determine the user's local time for accurate assistance.

Instructions

Returns the current local time and timezone information from your local machine. This helps you understand what time it is for the user you're assisting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'get_local_time' tool, which retrieves and formats the current local time and timezone information.
    def get_local_time() -> str:
        """
        Returns the current local time and timezone information from your local machine.
        This helps you understand what time it is for the user you're assisting.
        """
        local_time = datetime.now()
        timezone = str(local_time.astimezone().tzinfo)
        formatted_time = local_time.strftime("%Y-%m-%d %H:%M:%S")
        return f"Current Time: {formatted_time}\nTimezone: {timezone}"
  • Registers the 'get_local_time' tool with FastMCP using the @app.tool decorator, including title and read-only annotations.
    @app.tool(
        annotations = {
            "title": "Get Local Time and Timezone",
            "readOnlyHint": True
        }
    )
Behavior3/5

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

Annotations already declare readOnlyHint=true, indicating a safe read operation. The description adds value by specifying that the data comes from 'your local machine' and its purpose for assisting users, which provides useful context beyond the annotations. However, it does not disclose additional behavioral traits like performance or error handling.

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 two sentences, front-loaded with the core functionality and followed by a brief explanation of its utility. Every sentence adds value without redundancy, making it efficient and well-structured.

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 low complexity (0 parameters, read-only, with output schema), the description is complete enough for its purpose. It explains what the tool returns and why it's useful, and with an output schema present, it does not need to detail return values. However, it could be more explicit about sibling differentiation.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description does not mention parameters, which is appropriate. Baseline is 4 for zero parameters, as the description does not need to compensate for any 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 with a specific verb ('Returns') and resource ('current local time and timezone information from your local machine'). It distinguishes from the sibling 'get_utc' by specifying 'local' time, though not explicitly naming the alternative. The description avoids tautology by explaining what the tool does rather than restating the name.

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 description implies usage context by stating 'This helps you understand what time it is for the user you're assisting,' which suggests when to use it. However, it does not explicitly state when to use this tool versus the sibling 'get_utc' or provide any exclusions. The guidance is present but not comprehensive.

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/andybrandt/mcp-simple-timeserver'

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