async def long_task(steps: int, ctx: Context) -> str:
    """Long-running task to test progress reporting."""
    for i in range(1, steps + 1):
        await ctx.report_progress(i, steps, f"Processing step {i}/{steps}")
    return f"Completed {steps} steps"
Long-running task to test progress reporting.
llama-index-integrations/tools/llama-index-tools-mcp/tests/server.py