Skip to main content
Glama

get-current-time

Retrieve the current time in your local timezone to synchronize applications or check system time.

Instructions

Get the current time in the configured local timezone

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Executes the 'get-current-time' tool by returning the current local time as a formatted text content object.
    if name == "get-current-time":
        return [
            types.TextContent(
                type="text",
                text=f"The current time is {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}",
            )
        ]
  • Registers the 'get-current-time' tool, providing its name, description, and input schema for tool discovery.
    @server.list_tools()
    async def handle_list_tools() -> list[types.Tool]:
        """
        List available tools.
        Each tool specifies its arguments using JSON Schema validation.
        """
        return [
            types.Tool(
                name="get-current-time",
                description="Get the current time in the configured local timezone",
                inputSchema={"type": "object"},
            )
        ]
  • Defines the tool schema including name, description, and empty input schema (no parameters required).
    types.Tool(
        name="get-current-time",
        description="Get the current time in the configured local timezone",
        inputSchema={"type": "object"},
    )
Behavior3/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. It discloses the behavioral trait of returning time in a 'configured local timezone', which adds context beyond a basic time query. However, it doesn't mention potential issues like timezone configuration errors, response format, or latency.

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 with no wasted words. It is front-loaded with the core purpose and includes necessary context ('configured local timezone') without redundancy.

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 (0 parameters, no output schema, no annotations), the description is reasonably complete. It specifies the timezone aspect, which is crucial for understanding the output. However, without an output schema, it could briefly hint at the return format (e.g., timestamp string) for better completeness.

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 with 100% schema description coverage, so the schema already fully documents the lack of inputs. The description adds no parameter-specific information, but this is acceptable given the baseline of 4 for zero-parameter tools, as it doesn't need to compensate for gaps.

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') and resource ('current time'), with precise scope ('in the configured local timezone'). It distinguishes itself by specifying the timezone context, though no sibling tools exist for comparison.

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 for retrieving the current time in a specific timezone, but provides no explicit guidance on when to use this tool versus alternatives (e.g., UTC time tools) or any prerequisites. With no sibling tools, the baseline is adequate but lacks proactive guidance.

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/SecretiveShell/MCP-timeserver'

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