Skip to main content
Glama

greet

Generate personalized greetings by providing a name. Use this MCPKit tool to create custom welcome messages for users or applications.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • The async execute function that handles the 'greet' tool call, receiving a 'name' parameter and returning a text-based greeting response.
    execute: async ({ name }) => { return { content: [ { type: 'text', text: `Hello, ${name}! Nice to meet you.`, // Returns a personalized greeting }, ], }; },
  • Zod schema defining the input parameters for the 'greet' tool, specifically a required 'name' string.
    parameters: { name: z.string(), // Expects a string input named 'name' },
  • Registers the 'greet' tool object with the MCP server.
    server.tool(tool);
  • The class-based execute method that implements the 'greet' tool logic, similar to the functional version.
    public async execute({ name }: z.infer<ZodObject<typeof this.parameters>>) { return { content: [ { type: 'text', text: `Hello, ${name}! Nice to meet you.`, }, ], }; }
  • Zod schema defining the input parameters for the class-based 'greet' tool.
    const parameters = { name: z.string().describe('The name is required'), };
  • Registers the GreetTool class instance with the MCP server.
    server.tool(greetTool);

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/ribeirogab/mcpkit'

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