mcp_hello_name
Use this tool to generate personalized greetings by entering your name, part of the MCP framework for integrating custom tools with Cursor via the SouthAsia MCP server.
Instructions
A demonstration tool that greets you by name
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Your name |
Implementation Reference
- The core handler logic for the 'mcp_hello_name' tool inside handle_call_tool function. It extracts the user's name from arguments, validates it, and returns a personalized greeting message.elif name == "mcp_hello_name": user_name = arguments.get("name") if not user_name: raise ValueError("缺少名字參數") return [ types.TextContent( type="text", text=f"Hello {user_name}! 很高興見到您!" ) ]
- The tool definition including name, description, and input schema (JSON Schema) for 'mcp_hello_name', returned by the list_tools handler.types.Tool( name="mcp_hello_name", description="A demonstration tool that greets you by name", inputSchema={ "type": "object", "properties": { "name": { "type": "string", "description": "Your name" } }, "required": ["name"], }, ),
- src/southasia/server.py:31-37 (registration)Registers the hello_world module's list_tools and call_tool functions with the 'mcp_hello' prefix in the MCP server's HANDLERS list, enabling discovery and execution of the 'mcp_hello_name' tool.HANDLERS = [ { "prefixes": ["mcp_hello"], "list_tools": hello_world_list_tools, "call_tool": hello_world_call_tool } ]