Skip to main content
Glama
nks1097
by nks1097

grafana_executar_consulta

Execute Grafana data source queries through the unified /api/ds/query endpoint, specifying datasource UID, query expression, time range, and max points.

Instructions

  1. Executar consulta através do endpoint unificado /api/ds/query do Grafana.

Input Schema

NameRequiredDescriptionDefault
deNonow-1h
ateNonow
max_pontosNo
datasource_uidYes
consulta_expressaoYes

Output Schema

NameRequiredDescriptionDefault
erroNoMensagem de erro amigável caso haja falha
dadosNoCarga útil da resposta estruturada
avisosNoLista de alertas e avisos operacionais
sucessoNoIndica se a operação foi bem-sucedida
metadadosNoMetadados da execução
id_requisicaoNoIdentificador único da operação

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden, yet it only discloses the underlying HTTP endpoint. 'Executar consulta' implies a read operation, but nothing states permissions, whether the call is safe/idempotent, what errors look like for an invalid datasource_uid, or whether query expressions are evaluated server-side. The endpoint reference is a small, genuinely useful technical detail but far from sufficient for a 5-parameter tool that hits an arbitrary datasource.

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

Conciseness3/5

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

A single front-loaded sentence with no padding, which is structurally sound, but it is under-specified rather than concise and carries a leftover list-numbering artifact ('31.') that signals derived/generated text. The brevity comes at the cost of the information the agent actually needs.

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

Completeness2/5

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

The presence of an output schema relieves the description of explaining return values, but everything else is missing: no guidance on datasource_uid lookup (presumably via grafana_listar_fontes_dados), no query-language expectations, no parameter meaning. For a 5-parameter query executor among heavy sibling overlap, this leaves the agent materially under-informed.

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

Parameters1/5

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

Schema description coverage is 0% across five parameters, and the description mentions none of them. The optional time-window parameters (de/ate), max_pontos, datasource_uid and consulta_expressao would all benefit from format hints (RFC3339 vs relative 'now-1h', expected query syntax per datasource type), and none are given. The description does not compensate at all for the total absence of schema documentation.

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

Purpose3/5

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

The description names a verb+resource ('Executar consulta') and anchors it to a specific endpoint ('/api/ds/query'), which is more concrete than a bare tautology. However, it never says what kind of query is being run (PromQL? SQL? LogQL?) or how it relates to the ~90 sibling tools, several of which also run queries. With only 'consulta' as the object, an agent cannot tell this general-purpose executor apart from grafana_consultar_prometheus or grafana_executar_consulta_painel without 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 Guidelines2/5

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

There is no guidance on when this tool should be used instead of the datasource-specific query siblings (consultar_prometheus, consultar_loki, consultar_tempo, consultar_fonte_sql) or the panel-scoped variant. No prerequisites, no exclusions, no mention of alternatives. The agent has to infer usage entirely, which is a notable risk given how many query-related siblings exist.

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

Deploy Server

Other Tools