Skip to main content
Glama
tinytelly

Time MCP Server

by tinytelly

get_current_time

Retrieve the current date and time with timezone support and formatting options for accurate temporal information.

Instructions

Get the current date and time

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timezoneNoTimezone (optional, defaults to system timezone)system
formatNoTime format: "12hour", "24hour", or "iso" (default: 12hour)12hour

Implementation Reference

  • The handler logic for the 'get_current_time' tool, which retrieves the current date and time, applies optional timezone and format parameters, and returns a formatted text response.
    if (name === 'get_current_time') {
      const timezone = args?.timezone || 'system';
      const format = args?.format || '12hour';
      
      log('INFO', `Getting current time - timezone: ${timezone}, format: ${format}`);
      
      const now = new Date();
      let timeString: string;
    
      if (timezone !== 'system') {
        // For specific timezone
        const options: Intl.DateTimeFormatOptions = {
          timeZone: timezone as string,
          year: 'numeric',
          month: '2-digit',
          day: '2-digit',
          hour: '2-digit',
          minute: '2-digit',
          second: '2-digit',
          hour12: format === '12hour'
        };
        timeString = now.toLocaleString('en-US', options);
      } else {
        // System timezone
        if (format === 'iso') {
          timeString = now.toISOString();
        } else if (format === '24hour') {
          timeString = now.toLocaleString('en-US', { hour12: false });
        } else {
          timeString = now.toLocaleString('en-US', { hour12: true });
        }
      }
    
      const result = {
        content: [
          {
            type: 'text',
            text: `Current time: ${timeString}`,
          },
        ],
      };
      
      log('INFO', `Returning time: ${timeString}`);
      return result;
    }
  • src/index.ts:62-82 (registration)
    Registration of the 'get_current_time' tool in the tools/list response, including its description and input schema definition.
    {
      name: 'get_current_time',
      description: 'Get the current date and time',
      inputSchema: {
        type: 'object',
        properties: {
          timezone: {
            type: 'string',
            description: 'Timezone (optional, defaults to system timezone)',
            default: 'system'
          },
          format: {
            type: 'string',
            description: 'Time format: "12hour", "24hour", or "iso" (default: 12hour)',
            enum: ['12hour', '24hour', 'iso'],
            default: '12hour'
          }
        },
        additionalProperties: false,
      },
    },
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 states the tool gets the current date and time, implying a read-only operation, but doesn't mention any behavioral traits like performance, caching, rate limits, or error handling. For a tool with no annotations, this leaves significant gaps in understanding how it behaves.

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 without any unnecessary words. It's front-loaded and appropriately sized, making it easy to parse and understand quickly.

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 low complexity (2 optional parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on usage guidelines, behavioral traits, and output format, which could help the agent use it more effectively in context.

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

Parameters3/5

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

The input schema has 100% description coverage, with clear documentation for both parameters (timezone and format), including defaults and enum values. The description adds no additional parameter information beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage.

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 ('Get') and resource ('current date and time'), making it easy to understand what the tool does. However, it doesn't distinguish this tool from its sibling 'get_time_info', which might have overlapping functionality, so it doesn't reach the highest 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 its sibling 'get_time_info' or any alternatives. It lacks context about specific use cases, prerequisites, or exclusions, leaving the agent without direction on tool selection.

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/tinytelly/mcp-time'

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