Skip to main content
Glama
davidan90

MCP Node Time

by davidan90

get_current_date

Retrieve the current date with day-of-week information for any IANA timezone, optionally including time details, to ensure accurate timezone-aware date handling.

Instructions

Get the current date in a specific timezone with day of week information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timezoneYesIANA timezone identifier (e.g., "America/New_York", "Europe/London")
includeTimeNoWhether to include time information

Implementation Reference

  • The handler implementation for the 'get_current_date' tool. It extracts parameters, validates the timezone, formats the current date with day of week information, optionally adds time details, and returns a JSON-formatted response.
    case 'get_current_date': {
      const { timezone, includeTime = false } = args as { timezone: string; includeTime?: boolean };
      TimeService.validateTimezone(timezone);
      
      const now = new Date();
      const dateInfo = {
        timezone,
        date: now.toLocaleDateString('en-US', { 
          timeZone: timezone,
          year: 'numeric',
          month: '2-digit',
          day: '2-digit'
        }),
        dayOfWeek: now.toLocaleDateString('en-US', { 
          timeZone: timezone,
          weekday: 'long'
        }),
        fullDate: now.toLocaleDateString('en-US', { 
          timeZone: timezone,
          weekday: 'long',
          year: 'numeric',
          month: 'long',
          day: 'numeric'
        }),
      };
    
      if (includeTime) {
        const timeInfo = TimeService.getCurrentTime(timezone, 'full');
        Object.assign(dateInfo, {
          time: timeInfo.datetime,
          fullDateTime: timeInfo.localizedFormat,
          isDST: timeInfo.isDST,
          utcOffset: timeInfo.utcOffset,
        });
      }
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(dateInfo, null, 2),
          },
        ],
      };
    }
  • src/index.ts:80-98 (registration)
    The tool registration object for 'get_current_date' in the tools array used by ListToolsRequestHandler, including description and input schema.
    {
      name: 'get_current_date',
      description: 'Get the current date in a specific timezone with day of week information',
      inputSchema: {
        type: 'object',
        properties: {
          timezone: {
            type: 'string',
            description: 'IANA timezone identifier (e.g., "America/New_York", "Europe/London")',
          },
          includeTime: {
            type: 'boolean',
            description: 'Whether to include time information',
            default: false,
          },
        },
        required: ['timezone'],
      },
    },
  • Input schema definition for the 'get_current_date' tool, defining parameters for timezone and optional includeTime.
    inputSchema: {
      type: 'object',
      properties: {
        timezone: {
          type: 'string',
          description: 'IANA timezone identifier (e.g., "America/New_York", "Europe/London")',
        },
        includeTime: {
          type: 'boolean',
          description: 'Whether to include time information',
          default: false,
        },
      },
      required: ['timezone'],
    },
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 what the tool does but doesn't cover important traits like error handling (e.g., invalid timezone inputs), output format, or any side effects. For a tool with no annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core functionality. It avoids redundancy and wastes no words, making it easy to parse. However, it could be slightly more structured by explicitly separating key features, but it's still highly concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (date/time operations with parameters) and lack of annotations and output schema, the description is incomplete. It doesn't explain the return format, error cases, or how parameters affect the output (e.g., what 'includeTime' adds). For a tool with no structured output information, this leaves critical gaps for the agent.

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, clearly documenting both parameters ('timezone' and 'includeTime'). The description adds minimal value beyond this, mentioning 'specific timezone' and 'day of week information' but not elaborating on parameter usage or interactions. With high schema coverage, the baseline score of 3 is appropriate.

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: 'Get the current date in a specific timezone with day of week information.' It specifies the verb ('Get'), resource ('current date'), and key features (timezone-specific, includes day of week). However, it doesn't explicitly distinguish this from sibling tools like 'get_current_time' or 'get_system_timezone,' which likely 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 alternatives. It doesn't mention sibling tools like 'get_current_time' or 'convert_time,' nor does it specify use cases or exclusions. This leaves the agent without context for tool selection, resulting in a low score.

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

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