hello-world
Generate personalized greetings by providing a user name. This tool is part of the MCP Server Boilerplate, designed to integrate with AI assistants for creating custom tools.
Instructions
Say hello to the user
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the user |
Implementation Reference
- src/index.ts:19-30 (handler)The asynchronous handler function for the "hello-world" tool, which constructs a greeting message for the provided user name and returns it as text content.async ({ name }) => { const response = `Hello ${name}`; return { content: [ { type: "text", text: response, }, ], }; }
- src/index.ts:17-18 (schema)Input schema for the "hello-world" tool defining a required string parameter 'name'.name: z.string().describe("The name of the user"), },
- src/index.ts:14-31 (registration)Registration of the "hello-world" MCP tool using server.tool(), including description, input schema, and handler function."hello-world", "Say hello to the user", { name: z.string().describe("The name of the user"), }, async ({ name }) => { const response = `Hello ${name}`; return { content: [ { type: "text", text: response, }, ], }; } );