Skip to main content
Glama

Get datasource

get_datasource
Read-onlyIdempotent

Retrieve a single Grafana datasource by its UID, with secrets redacted. Use it to inspect datasource configuration before querying Prometheus, Loki, or SQL.

Instructions

Return a single datasource by UID (secrets redacted).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint, so the safety profile is covered. The description adds a genuinely useful behavioral detail not present in structured data: returned secrets are redacted, telling the agent credentials will be absent from the payload.

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?

One short sentence with the verb, scope, key, and an important caveat front-loaded; there is no filler or redundancy.

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 one-parameter read tool with full annotation coverage and no output schema, the description is nearly sufficient: it explains selection and the redaction behavior. It could still note the not-found/error case, which is the main remaining 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 description coverage is 0% and the schema only declares uid as a non-empty string, so the description must carry the meaning. Saying 'by UID' does identify the parameter as the datasource selector, but adds no format, source, or uniqueness details beyond that.

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?

The description gives a specific verb (Return), resource (a single datasource), and retrieval key (by UID). The singular 'single datasource' implicitly separates it from the plural list_datasources and the action-oriented query_datasource, though no sibling is named explicitly.

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 only implied: fetch one datasource when its UID is known. There is no explicit statement of when to prefer this over list_datasources or query_datasource, and no mention of error behavior for an unknown UID.

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