time
Retrieve the current time from the TypeScript MCP Server Boilerplate to synchronize applications or timestamp events.
Instructions
현재 시간을 반환합니다.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unixMs | Yes | Unix epoch milliseconds | |
| content | Yes | ||
| isoTime | Yes | ISO 8601 형식 현재 시간 |
Implementation Reference
- src/index.ts:117-158 (handler)The 'time' tool registration and handler implementation.
server.registerTool( 'time', { description: '현재 시간을 반환합니다.', inputSchema: z.object({}), outputSchema: z.object({ content: z.array( z.object({ type: z.literal('text'), text: z.string().describe('현재 시간 메시지') }) ), isoTime: z.string().describe('ISO 8601 형식 현재 시간'), unixMs: z.number().describe('Unix epoch milliseconds') }) }, async () => { const now = new Date() const isoTime = now.toISOString() const unixMs = now.getTime() const message = `현재 시간: ${isoTime}` return { content: [ { type: 'text' as const, text: message } ], structuredContent: { content: [ { type: 'text' as const, text: message } ], isoTime, unixMs } } } )