Skip to main content
Glama
nks1097
by nks1097

grafana_consultar_fonte_sql

Run read-only SELECT SQL queries against Grafana relational data sources (PostgreSQL, MySQL, MSSQL) by specifying a datasource UID for safe data retrieval.

Instructions

  1. Executar consultas SQL seguras (estritamente SELECT) em fontes relacionais (Postgres, MySQL, MSSQL).

Input Schema

NameRequiredDescriptionDefault
sql_queryYes
datasource_uidYes

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

B3/5.0
Behavior3/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. It does disclose one meaningful behavioral constraint — only SELECT statements are accepted — which is useful safety context for a SQL-execution tool. However, it says nothing about permissions required, row/timeout limits, whether the query is rejected or rewritten on violation, or error behavior.

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?

A single front-loaded sentence with the core constraint early and no wasted clauses. The leading '36.' is a numbering artifact that adds no information.

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

Completeness3/5

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

An output schema exists, so return values need not be explained, and the supported engines plus SELECT restriction cover the essentials of what the tool does. But with zero parameter documentation and no annotations, the definition leaves an agent guessing about argument format and execution limits.

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

Parameters2/5

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

Schema description coverage is 0% and neither of the two required parameters is documented. The description only indirectly hints that sql_query is a SELECT statement and that datasource_uid identifies a relational datasource; it adds no syntax, format, or constraint 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?

States a specific verb (executar) and resource (consultas SQL) plus the supported engines (Postgres, MySQL, MSSQL) and the SELECT-only restriction. This lets an agent distinguish it from the Prometheus/Loki/InfluxDB query siblings without opening a schema, though it never names those alternatives explicitly.

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 when-to-use or when-not-to-use guidance. The 'estritamente SELECT' parenthetical implies a read-only query scenario, but nothing tells the agent how this differs from grafana_executar_consulta or the engine-specific consultar_* tools.

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