async def periodic_updates():
    """Task that periodically updates resources to test subscriptions."""
    while True:
        await asyncio.sleep(10)
        # Update weather randomly
        new_temp = last_weather["temperature"] + random.uniform(-2, 2)
        conditions = ["sunny", "cloudy", "rainy", "windy", "snowy"]
        new_condition = random.choice(conditions)
        update_weather(new_temp, new_condition)
Task that periodically updates resources to test subscriptions.
llama-index-integrations/tools/llama-index-tools-mcp/tests/server.py