Skip to main content
Glama
sayedpfe

MCP & Copilot Studio Learning Project

by sayedpfe

greeting

Generate personalized greetings by specifying a name and choosing from formal, casual, or enthusiastic styles for customized messages.

Instructions

Create personalized greetings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the person to greet
styleNoStyle of greeting

Implementation Reference

  • src/index.ts:27-55 (registration)
    Primary registration of the 'greeting' tool. Includes tool name, description, Zod input schema (name: string, style: optional enum), and complete handler logic that generates personalized greetings based on style (formal, casual, enthusiastic). Returns structured text content.
    server.tool( "greeting", "Create personalized greetings", { name: z.string().describe("Name of the person to greet"), style: z.enum(["formal", "casual", "enthusiastic"]).optional().describe("Style of greeting"), }, async ({ name, style = "casual" }) => { let greeting; switch (style) { case "formal": greeting = `Good day, ${name}. I hope you're having a pleasant experience.`; break; case "enthusiastic": greeting = `HEY THERE ${name.toUpperCase()}! 🎉 You're AWESOME!`; break; default: // casual greeting = `Hey ${name}! Nice to meet you! 👋`; } return { content: [{ type: "text", text: greeting }] }; } );
  • Exercise completion version of the 'greeting' tool registration, identical implementation to the main src/index.ts version.
    server.tool( "greeting", "Create personalized greetings", { name: z.string().describe("Name of the person to greet"), style: z.enum(["formal", "casual", "enthusiastic"]).optional().describe("Style of greeting"), }, async ({ name, style = "casual" }) => { let greeting; switch (style) { case "formal": greeting = `Good day, ${name}. I hope you're having a pleasant experience.`; break; case "enthusiastic": greeting = `HEY THERE ${name.toUpperCase()}! 🎉 You're AWESOME!`; break; default: // casual greeting = `Hey ${name}! Nice to meet you! 👋`; } return { content: [{ type: "text", text: greeting }] }; } );

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/sayedpfe/MCP'

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