Skip to main content
Glama
ciel240
by ciel240

current_time

Get the current time in any timezone. Defaults to Korean time (Asia/Seoul) when no timezone is specified.

Instructions

현재 시간을 지정된 시간대에서 조회하는 도구. 시간대를 입력하지 않으면 한국 시간대(Asia/Seoul)를 사용합니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timezoneNo시간대 (예: Asia/Seoul, America/New_York, Europe/London). 입력하지 않으면 한국 시간대를 사용합니다.

Implementation Reference

  • MCP CallToolRequest handler for 'current_time': parses arguments using TimeToolSchema, calls getCurrentTime, and returns the formatted time as text content.
    if (request.params.name === 'current_time') {
        try {
            const { timezone } = TimeToolSchema.parse(request.params.arguments)
            
            const currentTime = getCurrentTime(timezone)
            const message = `현재 시간: ${currentTime}`
            
            return {
                content: [
                    {
                        type: 'text',
                        text: message
                    }
                ]
            }
        } catch (error) {
            return {
                content: [
                    {
                        type: 'text',
                        text: `시간 조회 오류: ${error instanceof Error ? error.message : '알 수 없는 오류'}`
                    }
                ],
                isError: true
            }
        }
    }
  • Zod schema defining the input for current_time tool: optional timezone string.
    const TimeToolSchema = z.object({
        timezone: z.string().optional().describe('시간대 (예: Asia/Seoul, America/New_York, Europe/London). 입력하지 않으면 한국 시간대(Asia/Seoul)를 사용합니다.')
    })
  • src/index.ts:357-370 (registration)
    Tool registration in ListToolsRequest handler: defines 'current_time' tool with description and inputSchema matching TimeToolSchema.
    {
        name: 'current_time',
        description: '현재 시간을 지정된 시간대에서 조회하는 도구. 시간대를 입력하지 않으면 한국 시간대(Asia/Seoul)를 사용합니다.',
        inputSchema: {
            type: 'object',
            properties: {
                timezone: {
                    type: 'string',
                    description: '시간대 (예: Asia/Seoul, America/New_York, Europe/London). 입력하지 않으면 한국 시간대를 사용합니다.'
                }
            },
            required: []
        }
    },
  • Helper function that formats and returns the current time in the specified timezone using Intl.DateTimeFormat, defaults to 'Asia/Seoul'.
    const getCurrentTime = (timezone: string = 'Asia/Seoul'): string => {
        try {
            const now = new Date()
            const options: Intl.DateTimeFormatOptions = {
                timeZone: timezone,
                year: 'numeric',
                month: '2-digit',
                day: '2-digit',
                hour: '2-digit',
                minute: '2-digit',
                second: '2-digit',
                hour12: false
            }
            
            const formatter = new Intl.DateTimeFormat('ko-KR', options)
            const timeString = formatter.format(now)
            
            return `${timeString} (${timezone})`
        } catch (error) {
            throw new Error(`유효하지 않은 시간대입니다: ${timezone}`)
        }
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It describes the default behavior (uses Asia/Seoul if no timezone is given) and implies it's a read-only query operation. However, it doesn't disclose other behavioral traits such as error handling for invalid timezones, rate limits, authentication needs, or the format of the returned time. For a tool with no annotations, this leaves gaps in understanding its full behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: it states the core purpose in the first clause and adds the default behavior in the second. Both sentences earn their place by providing essential information without redundancy. The structure is clear and efficient, with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one optional parameter) and no output schema, the description is somewhat complete but has gaps. It explains the purpose and default behavior, but without annotations or output schema, it doesn't cover error cases, return format, or other operational details. For a simple query tool, this is adequate but not fully comprehensive, aligning with a minimum viable score.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the parameter 'timezone' fully documented in the schema. The description adds minimal value beyond the schema by restating the default behavior (uses Asia/Seoul if not input). Since the schema already covers this, the description doesn't provide significant additional semantic context, meeting the baseline of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '현재 시간을 지정된 시간대에서 조회하는 도구' (a tool to query the current time in a specified timezone). It specifies the verb '조회' (query) and resource '현재 시간' (current time). However, it doesn't explicitly differentiate from sibling tools like 'greeting', which might also involve time-related functions, though the distinction is reasonably implied.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for usage: '시간대를 입력하지 않으면 한국 시간대(Asia/Seoul)를 사용합니다' (if no timezone is input, uses Korean timezone Asia/Seoul). This gives guidance on when to use the parameter. However, it doesn't explicitly state when to use this tool versus alternatives like 'greeting' or other time-related tools, nor does it mention any exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/ciel240/class_study'

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