say_hi
Send a greeting to Duyet with an optional personal message and receive contact information and connection links through the Duyet MCP Server.
Instructions
Send a friendly greeting to Duyet with an optional personal message. Get contact information and connection links
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | No | Optional personal message to include with the greeting |
Implementation Reference
- src/tools/say-hi.ts:23-54 (handler)The core handler function for the 'say_hi' tool. It generates a personalized greeting to Duyet, picks a random response, and returns formatted contact information.async ({ message }) => { const greeting = message ? `Hi Duyet! ${message}` : "Hi Duyet!"; const responses = [ "Thanks for saying hi! Hope you're having a great day!", "Hello there! Great to hear from you!", "Hi! Always nice to get a friendly greeting!", "Hey! Thanks for reaching out. Hope all is well!", "Hello! Appreciate you taking the time to say hi!", ]; const randomResponse = responses[Math.floor(Math.random() * responses.length)]; return { content: [ { type: "text", text: `${greeting} ${randomResponse} Connect with Duyet: Email: me@duyet.net GitHub: https://github.com/duyet LinkedIn: https://linkedin.com/in/duyet Blog: https://blog.duyet.net Feel free to reach out anytime!`, }, ], }; },
- src/tools/say-hi.ts:13-22 (schema)The input schema and metadata (title, description) for the 'say_hi' tool, using Zod for optional string 'message' parameter. References messageSchema defined above.{ title: "Say Hi", description: "Send a friendly greeting to Duyet with an optional personal message. Get contact information and connection links", inputSchema: { message: messageSchema.describe( "Optional personal message to include with the greeting", ), }, },
- src/tools/say-hi.ts:10-56 (registration)The registerSayHiTool function that registers the 'say_hi' MCP tool with the server, including name, schema, and handler.export function registerSayHiTool(server: McpServer) { server.registerTool( "say_hi", { title: "Say Hi", description: "Send a friendly greeting to Duyet with an optional personal message. Get contact information and connection links", inputSchema: { message: messageSchema.describe( "Optional personal message to include with the greeting", ), }, }, async ({ message }) => { const greeting = message ? `Hi Duyet! ${message}` : "Hi Duyet!"; const responses = [ "Thanks for saying hi! Hope you're having a great day!", "Hello there! Great to hear from you!", "Hi! Always nice to get a friendly greeting!", "Hey! Thanks for reaching out. Hope all is well!", "Hello! Appreciate you taking the time to say hi!", ]; const randomResponse = responses[Math.floor(Math.random() * responses.length)]; return { content: [ { type: "text", text: `${greeting} ${randomResponse} Connect with Duyet: Email: me@duyet.net GitHub: https://github.com/duyet LinkedIn: https://linkedin.com/in/duyet Blog: https://blog.duyet.net Feel free to reach out anytime!`, }, ], }; }, ); }
- src/tools/index.ts:43-44 (registration)The call to registerSayHiTool within registerAllTools, confirming 'say_hi' tool registration with logging.registerSayHiTool(server); logger.tool("say_hi", "registered");