Skip to main content
Glama
ciel240
by ciel240

greeting

Generate personalized greetings in multiple languages by providing a name and language selection. Supports Korean, English, Japanese, Chinese, Spanish, French, German, Italian, Portuguese, and Russian.

Instructions

사용자의 이름과 언어를 입력받아 해당 언어로 인사하는 도구

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes사용자의 이름
languageYes인사말을 할 언어 (korean, english, japanese, chinese, spanish, french, german, italian, portuguese, russian)

Implementation Reference

  • Handler function that executes the 'greeting' tool: parses arguments using GreetingToolSchema, selects appropriate greeting from greetingMessages based on language, constructs personalized message, and returns it as text content. Includes error handling.
    if (request.params.name === 'greeting') {
        try {
            const { name, language } = GreetingToolSchema.parse(request.params.arguments)
            
            const greeting = greetingMessages[language.toLowerCase()] || greetingMessages.english
            const message = `${greeting}, ${name}!`
            
            return {
                content: [
                    {
                        type: 'text',
                        text: message
                    }
                ]
            }
        } catch (error) {
            return {
                content: [
                    {
                        type: 'text',
                        text: `오류가 발생했습니다: ${error instanceof Error ? error.message : '알 수 없는 오류'}`
                    }
                ],
                isError: true
            }
        }
    }
  • Zod schema (GreetingToolSchema) used for input validation in the greeting tool handler.
    // Greeting tool schema
    const GreetingToolSchema = z.object({
        name: z.string().describe('사용자의 이름'),
        language: z.string().describe('인사말을 할 언어 (예: korean, english, japanese, chinese, spanish, french)')
    })
  • src/index.ts:315-333 (registration)
    Tool registration in the ListToolsRequestSchema handler: defines 'greeting' tool name, description, and input schema (including enum from greetingMessages).
    {
        name: 'greeting',
        description: '사용자의 이름과 언어를 입력받아 해당 언어로 인사하는 도구',
        inputSchema: {
            type: 'object',
            properties: {
                name: {
                    type: 'string',
                    description: '사용자의 이름'
                },
                language: {
                    type: 'string',
                    description: '인사말을 할 언어 (korean, english, japanese, chinese, spanish, french, german, italian, portuguese, russian)',
                    enum: Object.keys(greetingMessages)
                }
            },
            required: ['name', 'language']
        }
    },
  • Helper object containing greeting messages in multiple languages, used by the handler and referenced in the tool's input schema enum.
    // Greeting messages in different languages
    const greetingMessages: Record<string, string> = {
        korean: '안녕하세요',
        english: 'Hello',
        japanese: 'こんにちは',
        chinese: '你好',
        spanish: 'Hola',
        french: 'Bonjour',
        german: 'Hallo',
        italian: 'Ciao',
        portuguese: 'Olá',
        russian: 'Привет'
    }
Behavior2/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 of behavioral disclosure. The description only states what the tool does (greets with name and language) but doesn't disclose any behavioral traits like whether it's read-only, what the output format looks like, error handling, rate limits, or authentication needs. For a tool with no annotation coverage, this is a significant gap.

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 a single, efficient sentence in Korean that clearly states the tool's function. It's appropriately sized and front-loaded with the essential information. There's no wasted text or unnecessary elaboration.

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 (simple greeting function), 2 parameters with 100% schema coverage, and no output schema, the description is minimally adequate. However, without annotations or output schema, the description doesn't provide enough context about what the tool returns or its behavioral characteristics. It meets the minimum viable threshold but has clear gaps.

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 schema description coverage is 100%, with both parameters ('name' and 'language') fully documented in the schema. The description adds no additional parameter semantics beyond what's already in the schema (it just repeats that it takes name and language). According to the rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

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 that receives a user's name and language and greets in that language). It specifies the verb ('인사하는' - greets) and resources (name, language), but doesn't differentiate from sibling tools like 'calculator' or 'current_time' which serve completely different purposes, so it's not a perfect 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any specific contexts, prerequisites, or exclusions. While the purpose is clear, there's no explicit when/when-not usage advice, leaving the agent to infer based on the tool's name and description alone.

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