def METHOD_NAME(runtime, plan_name, messages_only):
    """
    Displays information for a MetaDeploy plan.
    """
    plans = runtime.project_config.plans or {}
    if plan_name not in plans:
        raise click.UsageError(
            f"Unknown plan '{plan_name}'. To view available plans run: `cci plan list`"
        )
    plan_config = plans[plan_name]
    console = Console()
    raw_data = {
        "title": plan_config["title"],
        "yaml_key": plan_name,
        "slug": plan_config["slug"],
        "tier": plan_config["tier"],
        "hidden": not plan_config.get("is_listed", "False"),
        "preflight_message": plan_config.get("preflight_message", ""),
        "post_install_message": plan_config.get("post_install_message", ""),
        "error_message": plan_config.get("error_message", ""),
        "checks": [
            [check.get("action", ""), check.get("message", ""), check.get("when", "")]
            for check in plan_config.get("checks", [])
        ],
        "steps": {},  # expensive to compute so we'll do later
    }
    messages_table = CliTable(
        title="Messages",
        data=[
            ["Type", "Message"],
            ["Title", raw_data["title"]],
            ["Preflight", raw_data["preflight_message"]],
            ["Post-install", raw_data["post_install_message"]],
            ["Error", raw_data["error_message"]],
        ],
    )
    if messages_only:
        console.print(messages_table)
        return
    config_table = CliTable(
        title="Config",
        data=[
            ["Key", "Value"],
            ["YAML Key", raw_data["yaml_key"]],
            ["Slug", raw_data["slug"]],
            ["Tier", raw_data["tier"]],
            ["Hidden?", raw_data["hidden"]],
        ],
    )
    plan_preflight_checks_table = CliTable(
        title="Plan Preflights",
        data=[
            ["Action", "Message", "When"],
            *raw_data["checks"],
        ],
    )
    steps = get_frozen_steps(runtime.project_config, plan_config)
    raw_data["steps"] = [
        [
            step_n + 1,
            step["name"],
            step["is_required"],
            step.get("is_recommended", True),
        ]
        for step_n, step in enumerate(steps)
    ]
    raw_data["steps_preflight_checks"] = [
        [
            step_n + 1,
            check.get("action", ""),
            check.get("message", ""),
            check.get("when", ""),
        ]
        for step_n, step in enumerate(steps)
        for check in step["task_config"]["checks"]
    ]
    step_preflight_checks_table = CliTable(
        title="Step Preflights",
        data=[
            ["Step", "Action", "Message", "When"],
            *raw_data["steps_preflight_checks"],
        ],
    )
    CliTable.PICTOGRAM_TRUE = "Yes"
    CliTable.PICTOGRAM_FALSE = "No"
    steps_table = CliTable(
        title="Steps",
        data=[
            ["Step", "Name", "Required", "Recommended"],
            *raw_data["steps"],
        ],
    )
    console.print(config_table)
    console.print(messages_table)
    console.print(plan_preflight_checks_table)
    console.print(step_preflight_checks_table)
    console.print(steps_table)