import asyncio
from mcp import Client
from server import mcp


async def main():
    async with Client(mcp) as client:
        result = await client.call_tool(
            "release_checklist",
            {"changed_files": ["src/app.py"], "tests_passed": True},
        )
        print(result.structured_content)
        assert result.structured_content["ready_for_human_review"] is True
        blocked = await client.call_tool(
            "release_checklist",
            {"changed_files": ["src/app.py"], "tests_passed": False},
        )
        assert blocked.structured_content["ready_for_human_review"] is False
        print("Both checklist paths passed. No deployment was performed.")


asyncio.run(main())
