hello_world
Generate greeting messages by specifying a name and optional delay. Returns personalized responses for testing or demonstration purposes.
Instructions
A simple hello world tool that returns a greeting.
Args:
name: Name to greet
delay: Optional delay in seconds
Returns:
A greeting message
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | World | |
| delay | No |
Implementation Reference
- run_server.py:61-61 (registration)Registration of the 'hello_world' tool using the @mcp.tool() decorator on the FastMCP instance.@mcp.tool()
- run_server.py:62-75 (handler)The implementation of the 'hello_world' tool handler. It logs the call, sleeps if delay specified, and returns a greeting message.async def hello_world(name: str = "World", delay: int = 0) -> dict: """A simple hello world tool that returns a greeting. Args: name: Name to greet delay: Optional delay in seconds Returns: A greeting message """ logger.info(f"hello_world called with name={name}, delay={delay}") if delay > 0: await asyncio.sleep(delay) return {"message": f"Hello, {name}!"}