Skip to main content
Glama
bakcoder

TypeScript MCP Server Boilerplate

by bakcoder

greet

Generate personalized greetings in multiple languages by providing a name and language preference. This tool helps developers test and demonstrate MCP server functionality.

Instructions

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

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes인사말

Implementation Reference

  • The 'greet' tool is registered and implemented directly in src/index.ts using server.registerTool. It takes 'name' and an optional 'language' as input and returns a greeting message.
    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('인사말')
            })
        },
        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
                        }
                    ]
                }
            }
        }
    )
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 correctly discloses that the tool returns a greeting (output behavior), but omits details on localization defaults, determinism, or whether external translation services are invoked.

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?

Single sentence with zero redundancy. Immediately conveys inputs and outputs without filler words. Appropriate length for a two-parameter utility function.

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?

Adequate for the tool's simplicity. With a documented output schema (per context signals) and complete input parameter coverage, the description successfully covers the essential contract without needing to elaborate on return value structure.

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 (both name and language parameters have complete descriptions and enums), the schema already documents semantics. The description merely lists the parameters ('이름과 언어') without adding syntax constraints, examples, or validation rules beyond the schema.

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 Korean description '이름과 언어를 입력하면 인사말을 반환합니다' clearly states the tool takes a name and language and returns a greeting. This functionally distinguishes it from siblings like calc, generate-image, and geocode, though it does not explicitly mention sibling alternatives.

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?

Provides only functional description ('input X, get Y') with no guidance on when this greeting tool should be preferred over simple string manipulation or which specific greeting format is returned.

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

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