greet
Generate personalized greetings in multiple languages by providing a name and preferred language. This tool helps create welcome messages for users in applications built with the TypeScript MCP Server Boilerplate.
Instructions
이름과 언어를 입력하면 인사말을 반환합니다.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | 인사할 사람의 이름 | |
| language | No | 인사 언어 (기본값: en) | en |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | 인사말 |
Implementation Reference
- src/index.ts:25-71 (handler)The 'greet' tool registration and handler implementation.
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 } ] } } } )