Skip to main content
Glama
mgcrea

@mgcrea/mcp-grafana

by mgcrea

@mgcrea/mcp-grafana

A Model Context Protocol server for the Grafana HTTP API: dashboards and the data their panels show, PromQL and LogQL through Grafana's datasources, alerts, alert rules, silences and annotations, shaped to fit a context window.

The server is read-only by default. The write tools are not merely refused when writes are off — they are never registered, so an agent cannot call them at all.

What it does that the API does not

  • Runs a panel the way the dashboard does. grafana_run_panel_query fills in template variables before sending the query, which /api/ds/query will not do for you. It takes them from vars, else the dashboard's saved value, else what the browser would pick: All, or the first value of a label_values(...) query, or "" ("None") when that query has no values. That last case is common, not an edge: provisioned dashboards (every kube-prometheus-stack mixin) are saved with no current values, and on a single-cluster install the mixins' cluster variable has no values at all. Mixed panels, datasource variables, hidden queries, expressions and library panels are handled. The result says which values were used and what query was sent.

  • Shapes data frames. Grafana answers every datasource in columnar frames: one frame per Prometheus series, each repeating its schema, and Loki log rows that each repeat the full stream label set alongside three UI-only columns. Here, time series come back on one step grid with min/max/avg/last, labels shared by every series or line come back once as common_labels, log lines are cut at max_line_chars, and anything else is a table.

  • Summarizes dashboards. grafana_get_dashboard flattens rows (collapsed, expanded and pre-schema-16), and lists each panel's id, type, unit and queries without the layout and styling: about half the JSON on the kubernetes mixins. view=full is there for editing.

  • Reads alerting from everywhere it lives. Grafana-managed rules and Grafana's own Alertmanager, plus every Prometheus/Loki datasource's ruler and every Alertmanager datasource. A kube-prometheus-stack install usually has everything in the datasources and nothing in Grafana. A source that does not answer (a Loki with no ruler) shows up in unavailable and does not fail the call.

  • Says which org it is reading. A service account token is bound to one org and takes no org in the request, so a token copied from the wrong org answers everything with plausible data. The org is shown in the startup banner and in grafana_auth_status, and stamped on every data response. With GRAFANA_ORG_ID set, every data tool refuses on a mismatch.

Related MCP server: grafana-mcp-server

Tools

Tool

What it does

Writes

grafana_auth_status

URL, version, org, login, effective role and permissions; setup steps when unset

no

grafana_search

Dashboards and folders by title, tag, folder, starred

no

grafana_get_dashboard

Summary (variables, panels, queries), one panel's JSON, or the full JSON

no

grafana_run_panel_query

A panel's queries with variables filled in, and the data they return

no

grafana_query_prometheus

PromQL, instant or range, through a Prometheus datasource

no

grafana_query_loki

LogQL log lines or metric queries through a Loki datasource

no

grafana_query

Raw queries against any datasource, including server-side expressions

no

grafana_list_labels

Label names or values for Prometheus/Loki, restricted by selector, last hour

no

grafana_list_datasources

uid, name, type, default — never credentials

no

grafana_list_alerts

Active alerts from every Alertmanager, most severe first

no

grafana_list_alert_rules

Rules and their state from Grafana and every datasource ruler

no

grafana_list_silences

Silences with readable matchers

no

grafana_list_annotations

Deploys, incidents and alert state changes in a window

no

grafana_request

GET any /api/ or /apis/ endpoint; any method (with confirm) when writes are on

gated

grafana_save_dashboard

Create or update a dashboard; refuses to overwrite a concurrent edit

yes

grafana_delete_dashboard

Delete a dashboard (confirm: true)

yes

grafana_create_annotation

Mark a moment or region

yes

grafana_create_silence

Silence alerts matching matchers, for a duration

yes

grafana_expire_silence

End a silence (confirm: true)

yes

Configure

Variable

Required

Description

GRAFANA_URL

yes

Grafana root URL, including any sub-path, e.g. https://grafana.example.com.

GRAFANA_SERVICE_ACCOUNT_TOKEN

one of

A service account token (glsa_…). GRAFANA_API_KEY is accepted as an alias.

GRAFANA_USERNAME / PASSWORD

one of

Basic auth instead of a token.

GRAFANA_ORG_ID

no

The org this server must read. Sent as X-Grafana-Org-Id; data tools refuse on a mismatch.

GRAFANA_ALLOW_WRITES

no

1 to register the write tools.

GRAFANA_HEADERS

no

Extra headers as JSON, e.g. a Cloudflare Access service token.

GRAFANA_TIMEOUT

no

Seconds per request. Defaults to 30.

GRAFANA_MAX_RETRIES

no

Retries on 429/502/503/504 for reads. Defaults to 2. Writes are never retried.

GRAFANA_DEBUG

no

1 to log each request to stderr.

The names match Grafana's own mcp-grafana, so swapping is a change of command in an .mcp.json.

A token needs Viewer for every read tool (with Viewer, the datasource list comes from the frontend settings, since /api/datasources needs more), Editor for dashboards and annotations, and whatever your alerting setup requires for silences. grafana_auth_status reports the role and the permissions the tools depend on.

Security

  • Read-only by default. GRAFANA_ALLOW_WRITES=1 adds the write tools; the destructive ones then additionally require an explicit confirm: true on every call, and grafana_request requires it for any method but GET.

  • Saves never overwrite. grafana_save_dashboard sends overwrite: false, so a dashboard changed since it was read is refused, not clobbered; every save stays in the version history.

  • No runtime dependencies beyond the MCP SDK and Zod — native fetch throughout.

  • Credentials stay in your environment, are never echoed back (grafana_auth_status lists header names, not values), and are refused when embedded in GRAFANA_URL.

Quick start

pnpm install
pnpm build
{
  "mcpServers": {
    "grafana": {
      "command": "npx",
      "args": ["-y", "@mgcrea/mcp-grafana"],
      "env": {
        "GRAFANA_URL": "https://grafana.example.com",
        "GRAFANA_SERVICE_ACCOUNT_TOKEN": "glsa_..."
      }
    }
  }
}

Inspect the tools

printf '%s\n' \
  '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"cli","version":"0"}}}' \
  '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
  '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
| node dist/cli.js 2>/dev/null | jq -r '.result.tools[]?.name'

Develop

pnpm dev            # tsdown --watch
pnpm test           # vitest
pnpm typecheck
pnpm lint
pnpm format

Publish

pnpm dlx release-it       # bump, commit, tag
git push --follow-tags    # CI publishes to npm + GHCR from the tag

License

MIT

Available Tools

14 tools
grafana_auth_statusGrafana: Auth StatusA
Read-only

Report which Grafana and which organization this server reads, as whom, and what that credential may do: the URL, Grafana version, org id and name, the login (a service account or a user), its effective role and permissions, and whether write tools are registered. When the server is not configured, says exactly what to set. Call this first when a tool you expected is missing, and before trusting data from an instance you have not checked: a service account token picks its org silently.

NameRequiredDescriptionDefault

No parameters

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, but the description adds genuinely new behavioral facts: it reports whether write tools are registered, and it explains the silent-org-selection hazard of service account tokens. It also covers the unconfigured-server case ('says exactly what to set'), removing the main failure-mode ambiguity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with purpose and followed by the call-conditions. The opening sentence is a long packed enumeration, which costs some readability, but no clause is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, yet the description enumerates the return surface in enough detail that an agent knows what it will get back. Combined with the misconfiguration and trust caveats, nothing material is missing for a zero-arg diagnostic tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Zero parameters, so there is nothing to disambiguate; baseline for an empty schema is 4. The description correctly implies the tool takes no input.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb plus resource ('Report which Grafana and which organization this server reads, as whom') and enumerates the exact fields returned: URL, version, org id/name, login identity, effective role/permissions, write-tool registration. The diagnostic framing cleanly separates it from every sibling (query/search/list tools).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives two concrete triggers: 'Call this first when a tool you expected is missing' and 'before trusting data from an instance you have not checked.' It also supplies the reason ('a service account token picks its org silently'), which is exactly the kind of condition-based routing an agent needs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

grafana_get_dashboardGrafana: Get DashboardA
Read-only

Read a dashboard. view=summary (default) returns what is on it without the layout: variables, and every panel (rows flattened) with its id, type, unit and queries — the layout, styling and overrides left out, typically half the JSON. view=panel returns one panel's full JSON (needs panel_id). view=full returns the whole dashboard JSON with its version, which is what grafana_save_dashboard needs back; it can be tens of KB. To see the DATA a panel shows, use grafana_run_panel_query instead of reading its query and re-typing it.

NameRequiredDescriptionDefault
uidYesThe dashboard uid, e.g. "alertmanager-overview" (from grafana_search or a /d/<uid>/ URL).
viewNosummary (default), panel (one panel's JSON, needs panel_id), or full.summary
panel_idNoThe panel id, from grafana_get_dashboard (or `viewPanel=` in a dashboard URL), e.g. 4.

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the read-only and open-world profile, and the description adds genuinely useful cost/omission detail: summary drops layout, styling and overrides ("typically half the JSON"), full "can be tens of KB" and carries `version`. It stops short of error behavior (unknown uid, missing/invalid panel_id) but discloses the main behavioral trade-offs of each mode.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action, then ordered by mode, with the sibling redirect last where an agent will look for it. Dense but no filler; the one compressed clause ("the layout, styling and overrides left out, typically half the JSON") takes a re-read but earns its space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description carries the return-shape burden — and it does: it enumerates what summary contains (variables, panels with id/type/unit/queries), what panel returns (full panel JSON), and what full returns (whole JSON plus `version`). Combined with the save/query cross-references, an agent has enough to pick a mode and call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns above that by explaining what each enum value of `view` actually yields and the conditional dependency that panel_id is required only for view=panel — semantics the terse schema enum text does not convey. `uid` and `panel_id` sourcing are left to the schema, which already handles them well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb + resource ("Read a dashboard") immediately followed by the three operating modes, each with a concrete definition of what is returned. It differentiates from siblings by naming grafana_save_dashboard (round-trip consumer of view=full) and grafana_run_panel_query (data instead of query text).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes each need to a mode: summary is the default for 'what is on it', panel needs panel_id, full is what save_dashboard needs back. It also names the correct alternative for a different intent ("To see the DATA a panel shows, use grafana_run_panel_query instead of reading its query and re-typing it"), including the anti-pattern to avoid.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

grafana_list_alert_rulesGrafana: List Alert RulesA
Read-only

The alert rules and their evaluation state, from Grafana-managed alerting and from every Prometheus/Loki datasource that evaluates its own rules. Firing first, then pending. Each rule has its group, state, health (and lastError when it fails to evaluate), its for and labels; include_query adds the expression. Recording rules are left out unless type=record or all. Use grafana_list_alerts for the alert instances themselves.

NameRequiredDescriptionDefault
typeNoalert (default), record (recording rules), or all.alert
groupNoOnly this rule group (or folder), substring, e.g. "kubernetes-apps".
limitNoMaximum rules (1-2000). Defaults to 100.
stateNoOnly rules in this state. Defaults to any.any
searchNoCase-insensitive substring to filter by, e.g. `nginx`.
sourceNoOnly this source: "grafana" for Grafana-managed alerting, or a Prometheus/Loki datasource uid or name. Defaults to every source.
unhealthyNoOnly rules whose evaluation fails (health err / nodata).
include_queryNoAdd each rule's expression. Off by default: it is most of the size.

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare readOnly and openWorld; the description adds real behavioral detail beyond them: result ordering ('Firing first, then pending'), per-rule fields returned including lastError on evaluation failure, and the cost caveat that include_query 'is most of the size'. It does not mention pagination/truncation, but the limit parameter covers that.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences, no filler, with the source scope and ordering constraint front-loaded and the redirect to the sibling tool placed last where it belongs. The opening sentence is slightly dense but every clause carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-param, no-output-schema listing tool, the description carries the return-value burden well by enumerating what each rule contains. Only minor gaps: nothing about result ordering guarantees under filtering or what a truncated (limit-capped) result looks like.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline would be 3, but the description adds meaning the schema lacks: it ties include_query to payload-size cost and clarifies the alert/record interaction of the type parameter. group/folder and unhealthy semantics remain schema-only.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('The alert rules and their evaluation state') and explicitly scopes the source set to Grafana-managed alerting plus every self-evaluating Prometheus/Loki datasource. It is clearly distinguishable from grafana_list_alerts, which is named as covering alert instances rather than rules.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent: 'Use grafana_list_alerts for the alert instances themselves' and states that recording rules are excluded 'unless type=record or all'. That gives both a when-not and an override condition, though other overlapping siblings (search, silences) are not addressed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

grafana_list_alertsGrafana: List AlertsA
Read-only

What is alerting right now: the alerts held by Grafana's Alertmanager and by every Alertmanager datasource, most severe first, with since when, summary and description. Silenced and inhibited alerts are left out unless state=suppressed or all. Labels shared by every alert come back once as common_labels; counts by severity and alertname cover the whole match even when the list is cut.

NameRequiredDescriptionDefault
limitNoMaximum alerts (1-1000). Defaults to 50.
stateNoactive (default): firing and not silenced; suppressed: silenced or inhibited; all.active
searchNoCase-insensitive substring to filter by, e.g. `nginx`.
sourceNoOnly this source: "grafana" for Grafana-managed alerting, or an Alertmanager datasource uid or name. Defaults to every source.
matchersNoLabel matchers, ANDed, e.g. ["namespace=~\"team-.*\"", "severity=\"critical\""]. Operators: = != =~ !~.
severityNoOnly this severity label, e.g. "critical".

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond readOnlyHint=true / openWorldHint=true, the description discloses real behavior: mandatory severity ordering, suppression excluded by default, `common_labels` deduplicated once, and — notably — that severity/alertname counts cover the entire match set even when the returned list is truncated by limit. That last detail is a non-obvious result-shape trait no structured field conveys.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three dense sentences, front-loaded with the core question ('What is alerting right now') and ending with the aggregation caveat. No filler, though the final sentence packs two distinct behaviors (common_labels and counts-under-truncation) into one clause.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-required-parameter, open-world read tool with no output schema, the description covers what comes back, ordering, default filtering, deduplication, and count semantics under pagination. It leaves the multi-source aggregation model (how grafana vs datasource alerts combine) and any auth expectations unstated, but nothing blocking for a correct call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all six parameters are already documented with examples and enum semantics. The description only reinforces the state parameter's suppression behavior and the truncation effect of limit; it adds little syntax or meaning the schema doesn't already carry.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

It states exactly what the tool returns — the alerts currently firing in Grafana's Alertmanager plus every Alertmanager datasource, ordered most-severe-first, with since/summary/description fields. That phrasing cleanly separates it from siblings like grafana_list_alert_rules (rule definitions) and grafana_list_silences (suppressions) without needing to name them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: the description tells you what 'right now' means and how suppressed alerts are gated behind state=suppressed or all, but never says when to reach for this vs grafana_list_alert_rules or grafana_list_silences. An agent must infer the routing from the sibling names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

grafana_list_annotationsGrafana: List AnnotationsA
Read-only

Annotations in a time window, newest first: deploys, incidents and notes people or CI marked on dashboards, and alert state changes (type=alert). Each has its time (and end for a region), text, tags, dashboard and panel. The usual question — "what changed around the spike?" — is a window around the spike with no other filter.

NameRequiredDescriptionDefault
toNoWindow end: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z) or unix seconds/ms. Defaults to now.
fromNoWindow start: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z) or unix seconds/ms. Defaults to now-24h.
tagsNoOnly annotations with ALL of these tags, e.g. ["deploy"]. Organization-wide annotations only.
typeNoannotation (made by people or CI), alert (alert state changes), or any.any
limitNoMaximum annotations (1-1000). Defaults to 100.
panel_idNoOnly this panel's (with dashboard_uid).
dashboard_uidNoOnly this dashboard's annotations, e.g. "alertmanager-overview".

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered; the description goes further by disclosing result ordering (newest first), the fields each annotation carries, and the type=alert distinction. Missing only operational detail such as truncation/limit behavior at the 1000 cap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences with the core scope front-loaded, then return shape, then a usage heuristic. The middle sentence's field list is slightly dense but each item earns its place by compensating for the absent output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter, all-optional read tool with no output schema, the description covers scope, ordering, and returned fields so an agent knows what comes back. It could say more about empty results or how filters combine, but nothing essential is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and already documents relative-time syntax, tag AND-semantics, the type enum and limits. The description only echoes the window concept and type=alert, adding little syntax or format meaning beyond the schema — baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Annotations in a time window, newest first') and enumerates what they are: deploys, incidents, notes, and alert state changes flagged via type=alert. That last clause usefully separates it from the grafana_list_alerts / grafana_list_alert_rules siblings, though those tools are not named outright.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete scenario ('what changed around the spike?') and the recommended invocation pattern — a window around the spike with no other filter. Clear positive guidance, but no explicit when-not / named-alternative routing (e.g. 'for current firing alerts use grafana_list_alerts instead').

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

grafana_list_datasourcesGrafana: List DatasourcesA
Read-only

List the datasources: uid, name, type (prometheus, loki, alertmanager, postgres…), and which one is the default. Every query tool takes a datasource by uid or name. Credentials and plugin settings are never returned.

NameRequiredDescriptionDefault
typeNoOnly datasources of this plugin type, e.g. "prometheus" or "loki".
searchNoCase-insensitive substring to filter by, e.g. `nginx`.

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered. The description adds real value beyond them by disclosing a data boundary: 'Credentials and plugin settings are never returned', which tells the agent what is safe to surface. It does not discuss completeness of the listing or permission/auth requirements, keeping it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, zero padding, and the returned-fields list is front-loaded immediately after the verb. Every sentence carries information an agent needs: scope, invocation context, and return boundary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description compensates by naming the returned fields (uid, name, type, default flag) and excluding sensitive ones. Combined with fully covered parameter docs, an agent has everything needed to select and call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both the `type` and `search` filters are already documented with examples in the schema, making 3 the baseline. The description mentions plugin types (prometheus, loki, alertmanager, postgres) but that echoes the schema's own example rather than adding new filtering semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (list) plus the resource (datasources) and enumerates the returned fields: uid, name, type, default flag. It also positions the tool relative to siblings by noting that every query tool consumes a datasource by uid or name, so an agent knows this is the discovery step preceding grafana_query/grafana_query_prometheus.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The sentence 'Every query tool takes a datasource by uid or name' gives clear implied usage: call this first to resolve a datasource reference. It stops short of explicit when-not guidance or naming a specific alternative (e.g. when to use grafana_search instead), so it is clear context without exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

grafana_list_labelsGrafana: List LabelsA
Read-only

Discover what to query, for a Prometheus or Loki datasource: with no label, the label names in use; with label, the values it takes (label=name lists Prometheus metric names). Restrict with selector to the series or streams that matter, e.g. the pods of one namespace. Looks at the last hour unless start is given — the datasource default is its whole retention, which returns everything that ever existed.

NameRequiredDescriptionDefault
endNoWindow end: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z) or unix seconds/ms. Defaults to now.
labelNoA label name, e.g. "namespace", or "__name__" for Prometheus metric names. Omit to list label names.
limitNoMaximum values (1-10000). Defaults to 500.
startNoWindow start: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z) or unix seconds/ms. Defaults to now-1h.
searchNoCase-insensitive substring to filter by, e.g. `nginx`.
selectorNoA series or stream selector to restrict to, e.g. `{namespace="monitoring"}` or, for Prometheus, a metric name like `kube_pod_info`. A selector only, no functions.
datasourceNoDatasource uid or name, e.g. "prometheus" or "Loki". Defaults to the default datasource. grafana_list_datasources lists them.

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover read-only and open-world, so the bar is lower; the description adds real value by disclosing the default one-hour window versus the datasource's whole-retention default, which is a genuine surprise-avoidance detail. It also documents the `__name__` special case for Prometheus. It does not mention result limits or cost of broad selectors, which would have earned a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core behavior, then mode-switching, then scoping, then the default-window caveat. Dense but every clause carries information; the em-dash construction is slightly heavy but not wasteful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Seven optional parameters, all schema-documented, and the description covers mode selection, scoping, and time defaults — enough for correct invocation. Since there is no output schema, a brief note on the returned shape (flat list vs. paginated) would have closed the remaining gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description goes further by explaining the semantic switch on `label` (absent = names, present = values, `__name__` = metric names) and giving a concrete `selector` example. It leaves `limit`, `search`, and `end` entirely to the schema, which is acceptable given full coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (discover/list label names and values) scoped to Prometheus or Loki datasources, and immediately distinguishes the two modes via `label`. An agent can tell this apart from grafana_query / grafana_query_prometheus, which fetch data rather than metadata, without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear conditional usage: omit `label` to enumerate label names, supply it to enumerate values, and use `selector` to narrow to relevant series/streams. The time-window guidance ('looks at the last hour unless start is given') is a concrete usage rule. It stops short of naming an explicit alternative tool or stating when-not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

grafana_list_silencesGrafana: List SilencesA
Read-only

The silences in Grafana's Alertmanager and every Alertmanager datasource: id, state, matchers, start and end, who created it and why. Expired silences are left out unless state=expired or all.

NameRequiredDescriptionDefault
limitNoMaximum silences (1-1000). Defaults to 100.
stateNocurrent (default): active and pending; expired; or all.current
searchNoCase-insensitive substring to filter by, e.g. `nginx`.
sourceNoOnly this source: "grafana" for Grafana-managed alerting, or an Alertmanager datasource uid or name. Defaults to every source.

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare readOnly and openWorld, so the description's addition that expired silences are filtered out by default (and how to include them) is genuine behavioral context an agent would otherwise miss. Pagination/limit behavior is left entirely to the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences with the resource and scope first, then the field list and the expired-silence caveat. The fragmentary opening ('The silences in…') is slightly awkward but wastes no words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A simple read-only list tool with no output schema, and the description covers sources, returned fields, and the default exclusion behavior — enough for correct invocation. Only the absence of routing guidance against sibling listing tools leaves a gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so limit, search, source and the state enum are already fully documented, including the same 'current/expired/all' semantics. The description adds no format examples or edge-case detail beyond the schema baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names the concrete resource (silences) and the scope (Grafana's Alertmanager plus every Alertmanager datasource), and enumerates the returned fields, so the agent knows this is a read of silence state rather than alerts or rules. It does not explicitly contrast with siblings like grafana_list_alerts, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the return-field list, and the note that expired silences are excluded unless state=expired or all hints at the main selection decision. There is no explicit 'use this when… instead of…' guidance relative to the other list_* tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

grafana_queryGrafana: QueryA
Read-only

Run raw queries against any datasource through /api/ds/query — for datasources with no dedicated tool (SQL, Elasticsearch, Tempo, CloudWatch…), or for server-side expressions over other queries ({"datasource": "__expr__", "type": "math", "expression": "$A / $B"}). Each query is the target object as it appears in a panel's JSON (grafana_get_dashboard view=panel shows one). Prefer grafana_query_prometheus / grafana_query_loki for those two, and grafana_run_panel_query to reproduce a panel. Dashboard variables are NOT filled in here.

NameRequiredDescriptionDefault
toNoRange end: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z) or unix seconds/ms. Defaults to now.
fromNoRange start: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z) or unix seconds/ms. Defaults to now-1h.
sortNoOrder of time series, applied before `limit` cuts: labels keeps the datasource's order; max/avg/last rank highest first, so a cut keeps the biggest.labels
viewNoFor time series. values: stats (min/max/avg/last) plus one value per step on a shared grid given by start and step, null where there was no sample. stats: the stats only, about a tenth of the size — use it to survey many series before reading a few.values
limitNoMaximum series, log lines or table rows per query (1-5000). Defaults to 100.
pointsNoTarget points per series (2-1000), from which the step is picked. Defaults to 60; a dashboard in a browser asks for ~1000, which is rarely worth the tokens.
queriesYesQuery objects, e.g. [{"refId": "A", "rawSql": "SELECT 1", "format": "table"}]. A query may carry its own "datasource" (uid string, or {"uid": ...}); refId defaults to A, B, C….
precisionNoSignificant digits to round fractional values to (whole numbers are never rounded). Defaults to 4; 0 returns the exact value.
datasourceNoDatasource uid or name, e.g. "prometheus" or "Loki". Defaults to the default datasource, for queries that name none. grafana_list_datasources lists them.
max_line_charsNoCut each log line at this many characters (50-20000). Defaults to 1000.

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=true, so the core safety profile is covered. The description adds useful behavioral context: it names the raw endpoint, explains that queries are panel-JSON target objects, gives an expression example, and warns that dashboard variables are not substituted. It does not cover auth requirements or error behavior, but that is less critical given the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense and front-loaded: it leads with the core action, then query-object semantics, then alternatives, then the variable caveat. Every sentence carries useful routing or behavioral information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given full parameter schema coverage, clear annotations, and no output schema, the description supplies what an agent needs: the endpoint behavior, query-object form, sibling alternatives, and the important variable-substitution limitation. No essential invocation context is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description still adds conceptual meaning for the `queries` parameter by explaining that each query is the target object from a panel's JSON and by demonstrating server-side expressions with `__expr__`, which goes beyond the schema's example.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action (run raw queries), resource (any datasource), and endpoint (/api/ds/query), and clearly distinguishes this generic tool from dedicated siblings like grafana_query_prometheus and grafana_query_loki. It also calls out server-side expressions as a distinct use case.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says when to use this tool (datasources with no dedicated tool, and __expr__ expressions) and when to prefer alternatives (grafana_query_prometheus, grafana_query_loki, grafana_run_panel_query). The caveat that dashboard variables are not filled in is a useful usage boundary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

grafana_query_lokiGrafana: Query LokiA
Read-only

Run LogQL through a Loki datasource. A log query ({namespace="api"} |= "error") returns lines newest first, each with its time, level and the labels that differ between lines (the shared ones once, as common_labels), cut at max_line_chars. A metric query (sum by (app) (count_over_time({namespace="api"} |= "error" [5m]))) returns series on a step grid with stats. Always put a label matcher in the selector and keep the range short: Loki scans every line in it. To count, prefer a metric query over fetching lines.

NameRequiredDescriptionDefault
endNoRange end: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z) or unix seconds/ms. Defaults to now.
exprYesA LogQL query, e.g. `{namespace="ingress-nginx"} |= "error" | json | status >= 500`. grafana_list_labels lists the stream labels to select on.
sortNoOrder of time series, applied before `limit` cuts: labels keeps the datasource's order; max/avg/last rank highest first, so a cut keeps the biggest.labels
stepNoResolution, as a duration (30s, 5m, 1h). Defaults to a round step giving `points` points. Grafana never goes below the datasource's scrape interval.
viewNoFor time series. values: stats (min/max/avg/last) plus one value per step on a shared grid given by start and step, null where there was no sample. stats: the stats only, about a tenth of the size — use it to survey many series before reading a few.values
limitNoMaximum log lines, or series for a metric query (1-5000). Defaults to 50.
startNoRange start: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z) or unix seconds/ms. Defaults to now-1h.
pointsNoTarget points per series (2-1000), from which the step is picked. Defaults to 60; a dashboard in a browser asks for ~1000, which is rarely worth the tokens.
instantNoFor a metric query: evaluate once at `end` instead of over the range.
directionNobackward (default): the newest `limit` lines. forward: the oldest first.backward
precisionNoSignificant digits to round fractional values to (whole numbers are never rounded). Defaults to 4; 0 returns the exact value.
datasourceNoDatasource uid or name, e.g. "prometheus" or "Loki". Defaults to the first Loki datasource. grafana_list_datasources lists them.
max_line_charsNoCut each log line at this many characters (50-20000). Defaults to 1000.

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description goes well beyond the readOnlyHint/openWorldHint annotations to describe return shapes: log queries return lines newest first with time, level and per-line labels, with shared labels hoisted into common_labels and truncation at max_line_chars; metric queries return series on a step grid with stats. It also discloses a genuine cost/performance trap (full-selector scans, so keep ranges short) and a token-efficiency heuristic for counting.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences: what it does, then return shape for each query mode, then the two rules that prevent bad calls. Concrete example LogQL is embedded inline rather than in a separate block, and the safety-critical advice (label matcher, short range) is placed where it will be read.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There are 13 parameters and no output schema, so the description carries the burden of explaining what comes back; it does exactly that for both response modes, including the common_labels hoisting and truncation. Together with the fully documented schema and the read-only annotation, an agent has everything needed to call this correctly and interpret the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already does the heavy lifting and the baseline is 3. The description still adds meaning by explaining how parameters shape the response: that max_line_chars cuts each line, that metric output arrives on a step grid, and that results are counted rather than listed. It doesn't re-explain the timestamp formats or enum semantics, but it doesn't need to.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence states a specific verb and resource ("Run LogQL through a Loki datasource"), and the following sentences split the tool into its two modes, log query vs metric query, with concrete example syntax for each. Because Loki/LogQL is named explicitly, an agent can distinguish this from grafana_query_prometheus and from the generic grafana_query without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives real operating guidance: always include a label matcher, keep the range short because Loki scans every line, and prefer a metric query over fetching lines when counting; the schema descriptions also point to grafana_list_labels and grafana_list_datasources for discovery. What's missing is explicit sibling routing (for example, when to prefer grafana_query or grafana_run_panel_query), so it stops just short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

grafana_query_prometheusGrafana: Query PrometheusA
Read-only

Evaluate PromQL through a Prometheus datasource. mode=instant (default) gives the value at one time — the right mode for almost every question, with any window written into the expression (increase(x[24h])). mode=range gives the shape over time on a step grid with min/max/avg/last per series; use view=stats with sort=max to find outliers among many series. Labels shared by every series come back once as common_labels. Aggregate in the expression (sum by, topk) rather than fetching raw series.

NameRequiredDescriptionDefault
endNoRange end for mode=range: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z) or unix seconds/ms. Defaults to now.
exprYesA PromQL expression, e.g. `sum by (namespace) (rate(container_cpu_usage_seconds_total[5m]))`. $__interval, $__rate_interval and $__range are filled in by Grafana.
modeNoinstant (default) or range.instant
sortNoOrder of time series, applied before `limit` cuts: labels keeps the datasource's order; max/avg/last rank highest first, so a cut keeps the biggest.labels
stepNoResolution, as a duration (30s, 5m, 1h). Defaults to a round step giving `points` points. Grafana never goes below the datasource's scrape interval.
timeNoEvaluation time for mode=instant: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z) or unix seconds/ms. Defaults to now.
viewNoFor time series. values: stats (min/max/avg/last) plus one value per step on a shared grid given by start and step, null where there was no sample. stats: the stats only, about a tenth of the size — use it to survey many series before reading a few.values
limitNoMaximum series (1-2000). Defaults to 100. To see the largest, write topk() into the query.
startNoRange start for mode=range: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z) or unix seconds/ms. Defaults to now-1h.
pointsNoTarget points per series (2-1000), from which the step is picked. Defaults to 60; a dashboard in a browser asks for ~1000, which is rarely worth the tokens.
precisionNoSignificant digits to round fractional values to (whole numbers are never rounded). Defaults to 4; 0 returns the exact value.
datasourceNoDatasource uid or name, e.g. "prometheus" or "Loki". Defaults to the default Prometheus datasource. grafana_list_datasources lists them.

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare readOnly/openWorld, and the description goes well beyond them: it discloses the return shape (min/max/avg/last per series, one value per step on a shared grid, null where no sample), the `common_labels` de-duplication, and relative payload cost ('about a tenth of the size'). That cost/shape guidance is exactly what an agent needs to avoid token blowups.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences, front-loaded with the default mode and the 'almost every question' heuristic, then progressive detail on range/stats and aggregation. No filler and no restatement of the tool name or title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 12-parameter tool with no output schema and thin annotations, the description covers mode choice, output shape, payload size, and aggregation strategy — enough to call it correctly. It says nothing about failure modes (bad PromQL, missing datasource) or what an empty result looks like, which is the remaining gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description adds genuine meaning on top by explaining the mode tradeoff, the view+sort interaction for outlier hunting, and the step/scrape-interval floor. It reinforces rather than repeats parameter docs, though per-parameter edge cases (limit vs topk interplay, precision) are left mostly to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb + resource: 'Evaluate PromQL through a Prometheus datasource', which cleanly separates it from the LogQL sibling grafana_query_loki and from panel/search tools. It also states the two operating modes up front, so an agent knows the shape of the call before opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit decision rules: instant is 'the right mode for almost every question', range is for shape-over-time, and 'use view=stats with sort=max to find outliers among many series'. It also states an anti-pattern ('Aggregate in the expression ... rather than fetching raw series'). It stops short of naming tool-level alternatives (grafana_query_loki, grafana_run_panel_query), which keeps it from a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

grafana_requestGrafana: RequestA
Read-only

Escape hatch: GET any Grafana HTTP API endpoint the other tools do not wrap — /api/v1/provisioning/alert-rules/, /api/v1/provisioning/contact-points, /api/v1/provisioning/policies, /api/folders, /api/library-elements, /api/teams/search, /api/org/users, /api/dashboards/uid//versions, /apis/dashboard.grafana.app/v2beta1/namespaces/default/dashboards/. The answer is the raw JSON, unshaped, cut at max_chars. Read-only: only GET is ever sent. Prefer the named tools, which shape their output.

NameRequiredDescriptionDefault
pathYesAPI path, starting with /api/ or /apis/, e.g. "/api/v1/provisioning/contact-points".
paramsNoQuery parameters. A repeated parameter is an array: {"tag": ["a", "b"]}.
max_charsNoCut the serialized answer at this many characters (100-200000). Defaults to 20000.

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnlyHint annotation, it discloses that only GET is ever sent, the answer is raw unshaped JSON, and output is truncated at max_chars. These are important behavioral details for an open-world escape-hatch tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with 'Escape hatch' and packs endpoint examples, safety, output shape, and alternative guidance into two dense sentences without filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an open-world raw HTTP passthrough with no output schema, it covers the essential missing pieces: read-only behavior, unshaped JSON output, truncation, and when to prefer named tools. An agent has enough to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents path, params, and max_chars well. The description reinforces usage with endpoint examples but does not add material parameter semantics beyond what the schema provides, making the baseline 3 appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly calls itself an escape hatch for GET requests to Grafana HTTP API endpoints not covered by other tools, and it lists concrete endpoint families. This clearly distinguishes it from the named siblings like grafana_query and grafana_get_dashboard.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states exactly when to use it — for endpoints the other tools do not wrap — and explicitly says to prefer the named tools, which shape their output. This gives an agent a clear routing rule and alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

grafana_run_panel_queryGrafana: Run Panel QueryA
Read-only

Run a dashboard panel's queries the way the dashboard would, and return the data: template variables ($namespace, ${datasource}) are filled in — from vars, else the value saved with the dashboard, else the variable's first value (or All) as the browser would pick — and the panel's datasource, hidden queries and expressions are respected. Returns the variable values used and each query as sent, so the result can be checked and re-run with other values. Time series come back on a step grid with stats, logs as lines, anything else as a table. The time range defaults to the dashboard's own (often now-1h).

NameRequiredDescriptionDefault
toNoRange end: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z) or unix seconds/ms. Defaults to the dashboard's time.to.
uidYesThe dashboard uid, e.g. "alertmanager-overview" (from grafana_search or a /d/<uid>/ URL).
fromNoRange start: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z) or unix seconds/ms. Defaults to the dashboard's time.from.
sortNoOrder of time series, applied before `limit` cuts: labels keeps the datasource's order; max/avg/last rank highest first, so a cut keeps the biggest.labels
varsNoVariable values by name, without the $, e.g. {"namespace": "monitoring", "pod": ["a", "b"]}. "All" or "$__all" selects All. A datasource variable takes a uid or name.
viewNoFor time series. values: stats (min/max/avg/last) plus one value per step on a shared grid given by start and step, null where there was no sample. stats: the stats only, about a tenth of the size — use it to survey many series before reading a few.values
limitNoMaximum series, log lines or table rows per query (1-1000). Defaults to 30.
pointsNoTarget points per series (2-1000), from which the step is picked. Defaults to 60; a dashboard in a browser asks for ~1000, which is rarely worth the tokens.
panel_idYesThe panel id, from grafana_get_dashboard (or `viewPanel=` in a dashboard URL), e.g. 4.
precisionNoSignificant digits to round fractional values to (whole numbers are never rounded). Defaults to 4; 0 returns the exact value.
max_line_charsNoCut each log line at this many characters (50-20000). Defaults to 1000.

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only cover readOnly/openWorld, yet the description discloses the real behavioral contract: variable resolution precedence (vars > dashboard-saved > first value/All), that hidden queries and expressions are honored, that the variable values used and each query as sent are returned for verification, and the per-shape output format (grid+stats / lines / table). No output schema exists, so this disclosure is doing essential work.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and return contract, and every sentence carries information. It is dense but slightly overpacked in one paragraph, and the closing note on the default time range partially repeats the schema's from/to documentation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-param tool with a nested `vars` object and no output schema, the description covers return format, variable resolution and defaults well. It stops short of error behavior (unknown panel id, non-query panels) and any permission caveats, which would be the remaining useful additions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds genuine semantics beyond the schema: the three-tier fallback for unfilled template variables and the default time range behavior. These explain how `vars` and the `from`/`to` omission actually behave, not just their formats.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: "Run a dashboard panel's queries ... and return the data", with the panel-scoped framing that separates it from raw query siblings like grafana_query_prometheus or grafana_query. The added clause about template variables and hidden queries makes the operation's boundaries unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description makes the usage context clear (reproduce what the dashboard would show, re-run with other values) and notes the default time range, but never names an alternative or states when to prefer grafana_query_prometheus/grafana_query instead of a panel query. Usage is implied by the panel framing rather than spelled out as routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 14 tool updatesv0.1.0
    • First observedgrafana_auth_status
    • First observedgrafana_get_dashboard
    • First observedgrafana_list_alert_rules
    • First observedgrafana_list_alerts
    • First observedgrafana_list_annotations
    • First observedgrafana_list_datasources
    • First observedgrafana_list_labels
    • First observedgrafana_list_silences
    • First observedgrafana_query
    • First observedgrafana_query_loki
    • First observedgrafana_query_prometheus
    • First observedgrafana_request
    • First observedgrafana_run_panel_query
    • First observedgrafana_search

TDQS

A4.2/5.0

Scored across 14 tools

Disambiguation4/5

Most tools target a clearly distinct resource or action (list_labels vs list_annotations vs list_silences vs get_dashboard vs run_panel_query), and the descriptions explicitly disambiguate the risky pairs: grafana_query tells you to prefer grafana_query_prometheus/grafana_query_loki, and grafana_list_alert_rules points to grafana_list_alerts for instances. The residual overlaps are grafana_query (generic /api/ds/query) versus the two datasource-specific query tools, and grafana_request acting as a catch-all over nearly everything. Both are framed as escape hatches, which mitigates but does not eliminate the risk of misselection.

Naming Consistency4/5

There is a single grafana_ prefix and a clear verb_noun cadence: list_* (labels, datasources, alerts, alert_rules, silences, annotations), query_* (prometheus, loki, and bare query), get_dashboard, run_panel_query, search. The deviations are small but real: grafana_search omits its object (search_dashboards would fit the pattern), grafana_auth_status is noun-only with no verb, and grafana_query / grafana_request carry no target noun.

Tool Count5/5

Fourteen tools is squarely in the well-scoped band, and each one earns its place: datasource discovery, label discovery, three query paths (Prometheus, Loki, generic), dashboard read plus panel replay, four alerting-state readers, annotations, auth check, and one read-only HTTP escape hatch. Nothing looks padded, and the escape hatch keeps the surface from ballooning into a tool per API endpoint.

Completeness4/5

The read-side lifecycle for Grafana investigation is covered end to end: discover datasources and labels, query metrics/logs/arbitrary sources, find and read dashboards, re-run panel queries with variables filled, and inspect alerts, rules, silences and annotations. The gaps are real but workaroundable: the surface is read-only, and grafana_get_dashboard refers to a grafana_save_dashboard tool that is not registered, which is a dangling pointer an agent may chase.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables MCP-compatible agents to interact with Grafana instances for searching, creating, and updating dashboards, exploring logs via Loki, querying datasources, managing alerts, incidents, and on-call shifts, and accessing observability data.
    8
    Apache 2.0
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to query Grafana datasources (Prometheus/Loki metrics and SQL databases like ClickHouse/Postgres/MySQL) and search or inspect dashboards through natural language, using read-only access to Grafana's API.
    6
    MIT
  • F
    license
    A
    quality
    B
    maintenance
    Enables assistants to read-only explore and analyze Grafana dashboards and data sources, execute queries against Prometheus and Azure Log Analytics, and run guided investigation workflows.
    7
    2
    -
  • A
    license
    B
    quality
    C
    maintenance
    Enables developers to investigate request failures by querying Prometheus metrics, Loki logs, and Tempo traces without opening Grafana, while supporting read-only access and optional Grafana annotations.
    11
    MIT