import {
  listDashboards
} from "./chunk-U2QIW2SW.js";
import "./chunk-CAY57CKF.js";
import "./chunk-KOO5733S.js";

// src/tools/list-dashboards.ts
async function handleListDashboards() {
  const result = await listDashboards();
  const dashboards = result.data;
  if (!Array.isArray(dashboards) || dashboards.length === 0) {
    return "No dashboards found in this project.\n\n> Tip: Use `platform_create_dashboard` to create a new dashboard.";
  }
  const lines = [];
  lines.push(`# Dashboards (${dashboards.length} total)
`);
  for (const d of dashboards) {
    lines.push(`## ${d.name}`);
    lines.push(`**ID**: ${d.id}`);
    lines.push(`**Graphs**: ${d.graphCount}`);
    lines.push(`**Updated**: ${d.updatedAt}`);
    lines.push("");
  }
  lines.push(
    "> Use `platform_get_dashboard` with the ID to see dashboard details including graphs."
  );
  return lines.join("\n");
}
export {
  handleListDashboards
};
//# sourceMappingURL=list-dashboards-G2WJOXWB.js.map