import {
  listSuites
} from "./chunk-UKRCZJJC.js";
import "./chunk-CAY57CKF.js";
import "./chunk-KOO5733S.js";

// src/tools/list-suites.ts
async function handleListSuites(params) {
  const suites = await listSuites();
  if (params.format === "json") {
    return JSON.stringify(suites, null, 2);
  }
  if (!Array.isArray(suites) || suites.length === 0) {
    return "No suites (run plans) found in this project.\n\n> Tip: Use `platform_create_suite` to create your first suite.";
  }
  const lines = [];
  lines.push(`# Suites / Run Plans (${suites.length} total)
`);
  for (const s of suites) {
    lines.push(`## ${s.name}`);
    lines.push(`**ID**: ${s.id}`);
    lines.push(`**Slug**: ${s.slug}`);
    lines.push(`**Scenarios**: ${s.scenarioIds.length}`);
    lines.push(`**Targets**: ${s.targets.length} (${s.targets.map((t) => `${t.type}:${t.referenceId}`).join(", ")})`);
    lines.push(`**Repeat**: ${s.repeatCount}x`);
    if (s.description) {
      lines.push(`**Description**: ${s.description}`);
    }
    if (Array.isArray(s.labels) && s.labels.length > 0) {
      lines.push(`**Labels**: ${s.labels.join(", ")}`);
    }
    lines.push("");
  }
  lines.push(
    "> Use `platform_get_suite` with the ID to see full details, or `platform_run_suite` to trigger execution."
  );
  return lines.join("\n");
}
export {
  handleListSuites
};
//# sourceMappingURL=list-suites-POTZ3ZT6.js.map