Skip to main content
Glama
shaleen-wonder-ent

Simple MCP Server

current_time

Retrieve the current date and time for timestamping events, scheduling tasks, or checking system time.

Instructions

Get the current date and time

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'current_time' tool: validates args with schema, creates new Date(), and returns formatted current time as text content.
    case 'current_time': { CurrentTimeArgsSchema.parse(args); const now = new Date(); return { content: [ { type: 'text', text: `Current date and time is from my Simple MCP Server:=>: ${now.toLocaleString()}`, }, ], }; }
  • Zod schema definition for 'current_time' tool arguments (empty object since no input required).
    const CurrentTimeArgsSchema = z.object({});
  • src/index.ts:80-87 (registration)
    Tool registration in ListTools response: defines name, description, and JSON input schema (empty object).
    { name: 'current_time', description: 'Get the current date and time', inputSchema: { type: 'object', properties: {}, }, },

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/shaleen-wonder-ent/simple-mcp-server'

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