Skip to main content
Glama
JunWoo0406

TypeScript MCP Server Boilerplate

by JunWoo0406

greet

Generate personalized greetings in multiple languages by providing a name and preferred language. This tool returns customized salutations for user interactions.

Instructions

이름과 언어를 입력하면 인사말을 반환합니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes인사할 사람의 이름
languageNo인사 언어 (기본값: en)en

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes인사말

Implementation Reference

  • The handler function for the 'greet' tool which takes a name and language and returns a localized greeting.
    async ({ name, language }) => {
        const greeting =
            language === 'ko'
                ? `안녕하세요, ${name}님!`
                : `Hey there, ${name}! 👋 Nice to meet you!`
    
        return {
            content: [
                {
                    type: 'text' as const,
                    text: greeting
                }
            ],
            structuredContent: {
                content: [
                    {
                        type: 'text' as const,
                        text: greeting
                    }
                ]
            }
        }
    }
  • src/index.ts:12-34 (registration)
    Registration of the 'greet' tool with its schema definition in src/index.ts.
    server.registerTool(
        'greet',
        {
            description: '이름과 언어를 입력하면 인사말을 반환합니다.',
            inputSchema: z.object({
                name: z.string().describe('인사할 사람의 이름'),
                language: z
                    .enum(['ko', 'en'])
                    .optional()
                    .default('en')
                    .describe('인사 언어 (기본값: en)')
            }),
            outputSchema: z.object({
                content: z
                    .array(
                        z.object({
                            type: z.literal('text'),
                            text: z.string().describe('인사말')
                        })
                    )
                    .describe('인사말')
            })
        },
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 that the tool returns a greeting output, confirming the read-only/generative nature. However, it omits side-effect disclosure, idempotency, or state persistence details, though these are less critical for this simple utility.

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 with zero waste. It front-loads the core action (returning a greeting) and necessary inputs.

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 this is a simple 2-parameter utility with 100% schema coverage and an output schema exists (per context signals), the description provides sufficient context for invocation. It does not need to explain return values since output schema is present.

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?

Schema description coverage is 100%, with the schema fully documenting both parameters (name as 'name of person to greet' and language with enum/default). The description mentions '이름과 언어' (name and language) confirming the schema, but does not add syntax or semantic meaning beyond the structured schema definitions.

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 returns a greeting (인사말) when given name and language inputs, providing a specific verb+resource. However, it does not explicitly differentiate from the generate-image sibling or clarify that this is text generation vs. other output types.

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 (e.g., when to use this instead of generate-image for text purposes), nor does it mention prerequisites or exclusions.

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

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