mcp_hello_world
Generate a greeting message using a simple demonstration tool integrated with the SouthAsia MCP Tool, designed for seamless interaction within the MCP framework.
Instructions
A simple demonstration tool that returns a greeting message
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| random_string | Yes | Dummy parameter for no-parameter tools |
Implementation Reference
- The handler logic inside handle_call_tool that executes the mcp_hello_world tool, returning a greeting text content.if name == "mcp_hello_world": return [ types.TextContent( type="text", text="Hello World! 這是您的第一個 mcp 工具!" ) ]
- The JSON schema defining the input parameters for the mcp_hello_world tool (requires a dummy random_string).inputSchema={ "type": "object", "properties": { "random_string": { "type": "string", "description": "Dummy parameter for no-parameter tools" } }, "required": ["random_string"], },
- src/southasia/handlers/hello_world.py:13-26 (registration)Registration of the mcp_hello_world tool in the handle_list_tools function, including name, description, and schema.types.Tool( name="mcp_hello_world", description="A simple demonstration tool that returns a greeting message", inputSchema={ "type": "object", "properties": { "random_string": { "type": "string", "description": "Dummy parameter for no-parameter tools" } }, "required": ["random_string"], }, ),