greet
Generate personalized greetings by providing a name input. This tool creates custom welcome messages for users in conversational interfaces.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>"
},
"name": "greet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- server.py:7-9 (handler)The main handler function for the 'greet' tool. It takes a 'name' parameter and returns a personalized greeting string. The @mcp.tool decorator registers it as an MCP tool.
@mcp.tool def greet(name: str) -> str: return f"Hello, {name}!"