greet
Generate personalized greetings by providing a name to create custom hello messages for any recipient.
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
- gemini-mcp-example/main.py:7-9 (handler)The greet tool handler function that takes a name parameter and returns a greeting string. Implements the core logic: return f"Hello {name}!"
@mcp.tool() def greet(name: str) -> str: return f"Hello {name}!" - gemini-mcp-example/main.py:7-7 (registration)Tool registration using the @mcp.tool() decorator from FastMCP. This registers the greet function as an MCP tool.
@mcp.tool()