Skip to main content
Glama
vjouenne76

MCP Server Scaffold

by vjouenne76

get_current_time

Retrieve the current date and time for timestamping, scheduling, or time-sensitive operations in AI workflows.

Instructions

Get the current date and time

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for 'get_current_time' tool that creates a new Date object and returns the current time in ISO string format wrapped in the MCP response structure.
    case 'get_current_time':
      const now = new Date();
      return {
        content: [
          {
            type: 'text',
            text: `Current time: ${now.toISOString()}`,
          },
        ],
      };
  • The schema definition for the 'get_current_time' tool, registered in the listTools response. It has no required input properties.
    {
      name: 'get_current_time',
      description: 'Get the current date and time',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    } as Tool,
  • src/index.ts:44-69 (registration)
    The registration of available tools in the ListToolsRequestSchema handler, including 'get_current_time'.
        tools: [
          {
            name: 'echo',
            description: 'Echo back the provided message',
            inputSchema: {
              type: 'object',
              properties: {
                message: {
                  type: 'string',
                  description: 'The message to echo back',
                },
              },
              required: ['message'],
            },
          } as Tool,
          {
            name: 'get_current_time',
            description: 'Get the current date and time',
            inputSchema: {
              type: 'object',
              properties: {},
            },
          } as Tool,
        ],
      };
    });
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/vjouenne76/mcp-server-scaffold'

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