greet
Generate personalized greetings in friendly, formal, or enthusiastic styles. Customize messages by providing a name and preferred tone for appropriate communication.
Instructions
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
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 decorator from strands library. Implements greeting logic for given name and style (friendly, formal, enthusiastic), using a styles dictionary to generate the message. The docstring provides input/output schema information used by the framework.@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"])