Skip to main content
Glama
drdudda-org

My Little MCP Server

by drdudda-org

현재 시간 조회

get_current_time

Retrieve current date and time in Korean Standard Time (KST) with format options including locale, ISO, and timestamp for accurate timekeeping applications.

Instructions

현재 시간을 알려주는 도구입니다. 한국 시간(KST)으로 현재 날짜와 시간을 반환합니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNo시간 포맷 (기본값: locale)

Implementation Reference

  • The async handler function for the get_current_time tool. It receives the format parameter, calls the getCurrentTime helper, and returns a structured response containing the current time as text.
    async ({ format = "locale" }) => {
      const currentTime = getCurrentTime(format);
      return {
        content: [{ 
          type: "text", 
          text: `현재 시간: ${currentTime}` 
        }]
      };
    }
  • The input schema and metadata for the get_current_time tool, defining the optional 'format' parameter as an enum of time formats.
    {
      title: "현재 시간 조회",
      description: "현재 시간을 알려주는 도구입니다. 한국 시간(KST)으로 현재 날짜와 시간을 반환합니다.",
      inputSchema: {
        format: z.enum(["locale", "iso", "timestamp"]).optional().describe("시간 포맷 (기본값: locale)")
      }
    },
  • src/index.ts:56-74 (registration)
    The registration of the get_current_time tool using server.registerTool, including name, schema, and handler.
    server.registerTool(
      "get_current_time",
      {
        title: "현재 시간 조회",
        description: "현재 시간을 알려주는 도구입니다. 한국 시간(KST)으로 현재 날짜와 시간을 반환합니다.",
        inputSchema: {
          format: z.enum(["locale", "iso", "timestamp"]).optional().describe("시간 포맷 (기본값: locale)")
        }
      },
      async ({ format = "locale" }) => {
        const currentTime = getCurrentTime(format);
        return {
          content: [{ 
            type: "text", 
            text: `현재 시간: ${currentTime}` 
          }]
        };
      }
    );
  • The helper function getCurrentTime that computes the current time (KST) in the specified format: 'locale' (Korean formatted), 'iso' (ISO-like), or 'timestamp' (Unix timestamp).
    function getCurrentTime(format: string = "locale"): string {
      const now = new Date();
      
      switch (format) {
        case "iso":
          return now.toLocaleString("sv-SE", { timeZone: "Asia/Seoul" }).replace(" ", "T") + ".000Z";
        case "timestamp":
          return now.getTime().toString();
        case "locale":
        default:
          return now.toLocaleString("ko-KR", {
            timeZone: "Asia/Seoul",
            year: "numeric",
            month: "2-digit", 
            day: "2-digit",
            hour: "2-digit",
            minute: "2-digit",
            second: "2-digit",
            weekday: "long"
          });
      }
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the tool's behavior by specifying it returns current time in KST, but does not mention potential traits like rate limits, error conditions, or whether it's read-only (implied but not stated). It adds some context but lacks comprehensive behavioral details.

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 front-loaded and concise, consisting of two efficient sentences that directly state the tool's function and output without unnecessary details. Every sentence earns its place by providing essential information, making it well-structured and easy to understand.

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 low complexity (one optional parameter, no output schema), the description is complete enough for basic usage, covering purpose and output format. However, it could benefit from mentioning the optional parameter or example outputs to enhance usability, but it adequately serves its simple function.

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, documenting the 'format' parameter with enum values. The description does not add any parameter-specific information beyond what the schema provides, such as explaining the default 'locale' format or usage examples. Baseline 3 is appropriate as the schema handles parameter documentation adequately.

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 clearly states the tool's purpose with specific verbs ('알려주는', '반환합니다') and resource ('현재 시간'), and distinguishes it from the sibling tool get_random_number by focusing on time retrieval rather than number generation. It specifies the timezone (KST) and scope (current date and time), making it highly specific.

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 implies usage context by stating it returns the current time in KST, which helps users know when to use it for time-related queries. However, it does not explicitly mention when not to use it or name alternatives, such as using get_random_number for non-time data, so it lacks explicit exclusions or named alternatives.

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/drdudda-org/my-little-mcp'

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