from mcp.server import MCPServer
from pydantic import BaseModel

mcp = MCPServer("Release checklist")


class Checklist(BaseModel):
    changed_file_count: int
    ready_for_human_review: bool
    next_step: str


@mcp.tool()
def release_checklist(changed_files: list[str], tests_passed: bool) -> Checklist:
    """Prepare a release review checklist; never publish or deploy anything."""
    return Checklist(
        changed_file_count=len(changed_files),
        ready_for_human_review=bool(changed_files) and tests_passed,
        next_step="Review the diff and approve separately.",
    )
