Skip to main content
Glama
jaejin0me

TypeScript MCP Server Boilerplate

by jaejin0me

greeting

Generate hello or goodbye messages in English or Korean for a specified person, using the TypeScript MCP Server Boilerplate.

Instructions

Say hello or goodbye to someone

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNoLanguage for greeting (optional, defaults to korean)
nameYesThe name of the person to greet
typeYesType of greeting - hello or goodbye

Implementation Reference

  • Handler function that implements the greeting tool logic, constructing personalized hello or goodbye messages in English or Korean based on the provided name, type, and language.
    }, async (args) => {
        const { name, type, language = 'korean' } = args
        
        let greeting: string
        
        if (language === 'english') {
            greeting = type === 'hello' ? `Hello, ${name}! Nice to meet you!` : `Goodbye, ${name}! See you later!`
        } else {
            greeting = type === 'hello' ? `안녕하세요, ${name}님! 만나서 반갑습니다!` : `안녕히 가세요, ${name}님! 또 만나요!`
        }
        
        return {
            content: [{ type: 'text', text: greeting }]
        }
    })
  • Zod schema defining the input parameters for the 'greeting' tool: name (required string), type (enum: hello/goodbye), language (optional enum: korean/english).
    name: z.string().describe('The name of the person to greet'),
    type: z.enum(['hello', 'goodbye']).describe('Type of greeting - hello or goodbye'),
    language: z.enum(['korean', 'english']).optional().describe('Language for greeting (optional, defaults to korean)')
  • src/index.ts:17-35 (registration)
    Registration of the 'greeting' tool on the MCP server, including description, input schema, and handler function.
    server.tool('greeting', 'Say hello or goodbye to someone', {
        name: z.string().describe('The name of the person to greet'),
        type: z.enum(['hello', 'goodbye']).describe('Type of greeting - hello or goodbye'),
        language: z.enum(['korean', 'english']).optional().describe('Language for greeting (optional, defaults to korean)')
    }, async (args) => {
        const { name, type, language = 'korean' } = args
        
        let greeting: string
        
        if (language === 'english') {
            greeting = type === 'hello' ? `Hello, ${name}! Nice to meet you!` : `Goodbye, ${name}! See you later!`
        } else {
            greeting = type === 'hello' ? `안녕하세요, ${name}님! 만나서 반갑습니다!` : `안녕히 가세요, ${name}님! 또 만나요!`
        }
        
        return {
            content: [{ type: 'text', text: greeting }]
        }
    })
  • src/index.ts:249-249 (registration)
    The 'greeting' tool is listed in the server's capabilities within the server-info resource.
    tools: ['greeting', 'calculator', 'time'],
  • src/index.ts:7-7 (registration)
    MCP server is named 'greeting-mcp-server', indicating it's themed around the greeting tool.
    name: 'greeting-mcp-server',
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states what the tool does ('say hello or goodbye') without mentioning any behavioral traits like output format, side effects, or error handling. This leaves significant gaps in understanding how the tool behaves in practice.

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 extremely concise and front-loaded, consisting of a single, clear sentence that directly states the tool's purpose. There is no wasted language, making it efficient and easy to parse for an AI agent.

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

Completeness2/5

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

Given the tool's simplicity and lack of annotations or output schema, the description is incomplete. It doesn't cover behavioral aspects like what the output looks like or any constraints, which are necessary for proper tool invocation. This makes it inadequate for full contextual understanding.

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 description adds no parameter semantics beyond what the input schema already provides. Since schema description coverage is 100%, the baseline score is 3. The description doesn't explain parameter interactions or provide additional context, so it meets the minimum but doesn't add extra value.

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 with specific verbs ('say hello or goodbye') and identifies the target ('to someone'), making it easy to understand. However, it doesn't differentiate this tool from potential siblings like 'calculator' or 'time', which serve entirely 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 context, prerequisites, or exclusions, leaving the agent to infer usage based solely on the purpose statement. This lack of explicit guidelines reduces its helpfulness.

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/jaejin0me/mcpServer_test'

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