import {
  listWorkflows
} from "./chunk-XRQNXN2Z.js";
import "./chunk-CAY57CKF.js";
import "./chunk-KOO5733S.js";

// src/tools/list-workflows.ts
async function handleListWorkflows() {
  const workflows = await listWorkflows();
  if (!Array.isArray(workflows) || workflows.length === 0) {
    return "No workflows found in this project.";
  }
  const lines = [];
  lines.push(`# Workflows (${workflows.length} total)
`);
  for (const w of workflows) {
    const tags = [];
    if (w.isEvaluator) tags.push("evaluator");
    if (w.isComponent) tags.push("component");
    const tagStr = tags.length > 0 ? ` [${tags.join(", ")}]` : "";
    lines.push(`## ${w.name}${tagStr}`);
    lines.push(`**ID**: ${w.id}`);
    if (w.description) lines.push(`**Description**: ${w.description}`);
    lines.push(`**Updated**: ${w.updatedAt}`);
    lines.push("");
  }
  lines.push(
    "> Use `platform_get_workflow` with the ID to see full workflow details."
  );
  return lines.join("\n");
}
export {
  handleListWorkflows
};
//# sourceMappingURL=list-workflows-QQZQIOHB.js.map