openclaw-grafana-lens
Version:
OpenClaw plugin that gives AI agents full Grafana access — 18 composable tools for PromQL/LogQL/TraceQL queries, dashboard creation, alerting, SRE investigation, security monitoring, data collection pipeline management via Grafana Alloy (29 recipes), and
43 lines (42 loc) • 1.3 kB
TypeScript
/**
* grafana_get_dashboard tool
*
* Returns a compact summary of a dashboard — panels, their types, and
* the queries they run. Keeps agent context small (full dashboard JSON
* can be huge) while giving enough info to compose workflows.
*
* The `audit` mode dry-runs each panel's queries against Grafana to
* check which panels return data and which are broken — one tool call
* replaces N separate grafana_query calls.
*/
import { GrafanaClientRegistry } from "../grafana-client-registry.js";
export declare function createGetDashboardToolFactory(registry: GrafanaClientRegistry): (_ctx: unknown) => {
name: string;
label: string;
description: string;
parameters: {
type: "object";
properties: {
uid: {
type: string;
description: string;
};
compact: {
type: string;
description: string;
};
audit: {
type: string;
description: string;
};
};
required: string[];
};
execute(_toolCallId: string, params: Record<string, unknown>): Promise<{
content: Array<{
type: "text";
text: string;
}>;
details: unknown;
}>;
};