Skip to main content
Glama
devbrother2024

TypeScript MCP Server Boilerplate

time

Get current time with optional timezone specification. Returns the current time for any specified IANA timezone, defaulting to Asia/Seoul.

Instructions

현재 시각을 반환합니다. 타임존을 지정할 수 있습니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timezoneNoIANA 타임존 (기본값: Asia/Seoul)Asia/Seoul

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes현재 시각

Implementation Reference

  • Tool 'time' definition and handler registration.
    server.registerTool(
        'time',
        {
            description: '현재 시각을 반환합니다. 타임존을 지정할 수 있습니다.',
            inputSchema: z.object({
                timezone: z
                    .string()
                    .optional()
                    .default('Asia/Seoul')
                    .describe('IANA 타임존 (기본값: Asia/Seoul)')
            }),
            outputSchema: z.object({
                content: z
                    .array(
                        z.object({
                            type: z.literal('text'),
                            text: z.string().describe('현재 시각')
                        })
                    )
                    .describe('현재 시각')
            })
        },
        async ({ timezone }) => {
            let text: string
            try {
                const now = new Date()
                text = new Intl.DateTimeFormat('ko-KR', {
                    timeZone: timezone,
                    dateStyle: 'full',
                    timeStyle: 'long'
                }).format(now)
            } catch {
                throw new Error('유효하지 않은 타임존입니다.')
            }
    
            return {
                content: [{ type: 'text' as const, text }],
                structuredContent: {
                    content: [{ type: 'text' as const, text }]
                }
            }
        }
    )
Behavior3/5

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

Without annotations, the description carries the burden of behavioral disclosure, mentioning timezone support but omitting details about the return format (though mitigated by the presence of an output schema). It does not explicitly confirm this is a safe, idempotent read operation, though this is reasonably inferred from the description's wording.

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 consists of two efficient sentences that front-load the core functionality (returning current time) followed by the key optional feature (timezone specification). There is no redundant or extraneous information.

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

Completeness4/5

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

Given the tool's simplicity (single optional parameter) and the presence of an output schema to define return values, the description provides sufficient context for an agent to understand and invoke the tool correctly. It appropriately delegates parameter details to the schema while conveying the essential purpose.

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?

With 100% schema description coverage, the parameter semantics are adequately handled by the schema itself, which documents the timezone string format and default value. The description adds minimal semantic context beyond stating that timezone specification is possible, meeting the baseline expectation for high-coverage schemas.

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

Purpose5/5

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

The description uses the specific verb '반환합니다' (returns) with the resource '현재 시각' (current time), clearly indicating it retrieves temporal data. This distinctly differentiates it from siblings like calc (calculation), generate-image (image creation), and get-weather (weather data).

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

Usage Guidelines3/5

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

While the description implies usage by stating it returns the current time and accepts timezone parameters, it lacks explicit guidance on when to prefer this over manually calculating time or using other tools. No alternative approaches or exclusion criteria are mentioned.

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/devbrother2024/my-mcp-server-260402'

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