Skip to main content
Glama
t-shiratori

Time Tools MCP Server

get_current_date_time

Retrieve the current date and time in a standard format, optionally specifying a timezone for accurate local or global time display.

Instructions

Get the current date and time (e.g. 2025-01-01 01:01:01)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timezoneNo

Implementation Reference

  • The handler function for the 'get_current_date_time' tool. It uses dayjs to get the current date and time in the specified (or default) timezone, formats it using DEFAULT_TIME_FORMAT, and returns it as text content.
    async ({ timezone }) => {
        const currentDateTime = dayjs()
            .tz(getTZ(timezone))
            .format(DEFAULT_TIME_FORMAT);
        return {
            content: [
                {
                    type: "text",
                    text: currentDateTime,
                },
            ],
        };
    },
  • Input schema for the 'get_current_date_time' tool, defining an optional 'timezone' string parameter.
    {
        timezone: z.string().optional(),
    },
  • src/index.ts:91-110 (registration)
    Registration of the 'get_current_date_time' tool on the MCP server, including name, description, input schema, and handler function.
    server.tool(
        "get_current_date_time",
        "Get the current date and time (e.g. 2025-01-01 01:01:01)",
        {
            timezone: z.string().optional(),
        },
        async ({ timezone }) => {
            const currentDateTime = dayjs()
                .tz(getTZ(timezone))
                .format(DEFAULT_TIME_FORMAT);
            return {
                content: [
                    {
                        type: "text",
                        text: currentDateTime,
                    },
                ],
            };
        },
    );
  • Helper function 'getTZ' used by the handler to determine the timezone, defaulting to guessed timezone if not provided.
    const getTZ = (timezon?: string) => {
        return timezon || dayjs.tz.guess();
    };
  • Constant defining the default time format string used in the handler.
    const DEFAULT_TIME_FORMAT = "YYYY-MM-DD HH:mm:ss";
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states what the tool returns (current datetime with example format) but lacks behavioral details like whether it's real-time, if it uses system time, error handling, or performance characteristics.

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?

Single sentence with zero waste, front-loaded with the core purpose. The example format is efficiently included as parenthetical clarification.

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?

For a simple tool with 1 parameter, no annotations, and no output schema, the description is minimally adequate. It covers the basic purpose and output format but lacks parameter documentation and behavioral context that would be helpful given the absence of structured fields.

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?

Schema coverage is 0%, but the description does not mention the 'timezone' parameter at all. However, with only 1 parameter and no schema descriptions, the baseline is high. The description adds value by specifying the output format example, but misses parameter context.

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 verb 'Get' and the resource 'current date and time', with a specific example format. It distinguishes from siblings like get_current_date_time_iso (ISO format) and get_unixtime (Unix timestamp).

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

Usage Guidelines4/5

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

The description implies usage for obtaining current datetime in a specific format, but does not explicitly state when to use this vs. alternatives like get_current_date_time_iso or get_unixtime. The context is clear but lacks explicit sibling differentiation.

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/t-shiratori/time-tools-mcp-server'

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