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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:87-96 (handler)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()}`, }, ], };
- src/index.ts:59-66 (schema)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, ], }; });