human_weather_tool
Check and report current weather conditions at your location by leveraging human input through a Streamlit UI. Ideal for accurate, real-time updates.
Instructions
人間が現在地の天気を確認して報告します。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- human_mcp/mcp_server.py:103-121 (handler)The handler function for human_weather_tool. It generates a unique task ID, adds a weather check instruction to the database via db_utils.add_task, logs the task creation, asynchronously polls for completion using wait_for_task_completion, and returns the result as {'weather': result}.@mcp.tool() async def human_weather_tool(ctx: Context) -> Dict[str, str]: """人間が現在地の天気を確認して報告します。""" task_id = str(uuid.uuid4()) instruction = f"🌤️ 現在地の天気を確認してください" # タスクをデータベースに追加 db_utils.add_task(task_id, instruction) # ログ出力 sys.stderr.write(f"Human task created: {task_id}. Waiting for completion...\n") # 結果を待機(非同期ポーリング) result = await wait_for_task_completion(task_id) # ログ出力 sys.stderr.write(f"Human task {task_id} completed.\n") return {"weather": result}
- human_mcp/tools.py:59-74 (schema)The tool schema definition in the HUMAN_TOOLS list, specifying the name, description, empty input schema (no parameters), and output schema requiring a 'weather' string field.{ "name": "human_weather_tool", "description": "人間が現在地の天気を確認して報告します。", "input_schema": { "type": "object", "properties": {}, "required": [] }, "output_schema": { "type": "object", "properties": { "weather": {"type": "string", "description": "現在地の天気情報"} }, "required": ["weather"] } }