Skip to main content
Glama

greet

Generate personalized greetings in multiple languages by providing the recipient's name and preferred language. Ideal for creating tailored AI assistant interactions.

Instructions

Generate a personalized greeting

Input Schema

NameRequiredDescriptionDefault
languageNoLanguage for the greeting
nameYesName of the person to greet

Input Schema (JSON Schema)

{ "properties": { "language": { "description": "Language for the greeting", "enum": [ "en", "zh", "es", "fr" ], "type": "string" }, "name": { "description": "Name of the person to greet", "type": "string" } }, "required": [ "name" ], "type": "object" }

Implementation Reference

  • demo.ts:107-130 (handler)
    Handler for the 'greet' tool that extracts the person's name and optional language from arguments, selects the appropriate greeting from a predefined map, and returns it as text content.
    if (name === "greet") { const { name: personName, language = "en" } = args as { name: string; language?: string; }; const greetings: Record<string, string> = { en: `Hello, ${personName}! How are you today?`, zh: `你好,${personName}!今天过得怎么样?`, es: `¡Hola, ${personName}! ¿Cómo estás hoy?`, fr: `Bonjour, ${personName}! Comment allez-vous aujourd'hui?`, }; const greeting = greetings[language] || greetings.en; return { content: [ { type: "text", text: greeting, }, ], }; }
  • demo.ts:43-61 (schema)
    Input schema definition for the 'greet' tool, specifying the required 'name' parameter and optional 'language' with supported enums.
    { name: "greet", description: "Generate a personalized greeting", inputSchema: { type: "object", properties: { name: { type: "string", description: "Name of the person to greet", }, language: { type: "string", description: "Language for the greeting", enum: ["en", "zh", "es", "fr"], }, }, required: ["name"], }, },

Other Tools

Related 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/joeguo911/mcp-demo'

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