get-current-time.prompt.tsβ’1.24 kB
import { Injectable } from '@nestjs/common'
import { Prompt } from '@rekog/mcp-nest'
import { z } from 'zod'
@Injectable()
export class GetCurrentTimePrompt {
@Prompt({
name: 'get_current_time',
description: 'Get guidance on checking the current time in a specific timezone',
parameters: z.object({
timezone: z
.string()
.describe(
'The IANA timezone identifier (e.g., "America/New_York", "Europe/London", "Asia/Tokyo")',
),
}),
})
async execute({ timezone }: { timezone: string }) {
return {
description: `Guidance for getting current time in ${timezone}`,
messages: [
{
role: 'user' as const,
content: {
type: 'text' as const,
text: `What is the current time in ${timezone}? Please include the local time, UTC time, and timezone offset.`,
},
},
{
role: 'assistant' as const,
content: {
type: 'text' as const,
text: `I'll get the current time information for ${timezone} using the get_timezone_info tool. This will show you the local time, UTC time, timezone offset, and Unix timestamp.`,
},
},
],
}
}
}