hello
Generate personalized greeting messages by providing a name. This tool creates hello messages for use in AI assistant integrations and development workflows.
Instructions
A simple greeting tool that returns a hello message.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name to greet |
Implementation Reference
- src/server.ts:20-24 (handler)The handler function that executes the 'hello' tool logic. Takes a 'name' parameter and returns a greeting message in MCP content format.
async ({ name }) => { return { content: [{ type: 'text' as const, text: `Hello, ${name}!` }], } } - src/server.ts:17-19 (schema)Zod schema definition for the 'hello' tool input. Defines a 'name' parameter as a string with a description.
{ name: z.string().describe('Name to greet'), }, - src/server.ts:14-25 (registration)Tool registration with the MCP server using server.tool(). Registers 'hello' tool with its name, description, schema, and handler function.
server.tool( 'hello', 'A simple greeting tool that returns a hello message.', { name: z.string().describe('Name to greet'), }, async ({ name }) => { return { content: [{ type: 'text' as const, text: `Hello, ${name}!` }], } } )