Skip to main content
Glama
mgcrea

@mgcrea/mcp-grafana

by mgcrea

Grafana: List Datasources

grafana_list_datasources
Read-only

List Grafana datasources with their UID, name, type, and default status to choose the correct source for queries. Filter results by plugin type or name substring.

Instructions

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.

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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.