greet
Generate personalized greeting messages in friendly, formal, or enthusiastic styles to initiate communication through the Strands MCP Server.
Instructions
Greet someone with different styles.
Returns: str: A greeting message
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the person to greet | |
| style | No | Greeting style - "friendly", "formal", or "enthusiastic" | friendly |
Implementation Reference
- tools/greet.py:6-23 (handler)The 'greet' tool handler: decorated with @tool from strands, implements greeting logic using a dictionary of styles based on input parameters 'name' and 'style'. The docstring provides input schema details.@tool def greet(name: str, style: str = "friendly") -> str: """Greet someone with different styles. Args: name: The name of the person to greet style: Greeting style - "friendly", "formal", or "enthusiastic" Returns: str: A greeting message """ styles = { "friendly": f"Hey {name}! Great to see you! 👋", "formal": f"Good day, {name}. It is a pleasure to meet you.", "enthusiastic": f"🎉 {name}!!! SO excited to see you! 🚀✨", } return styles.get(style, styles["friendly"])