Skip to main content
Glama
Grafana MCP Server
by nks1097

grafana_comparar_metricas_periodos

Compare a metric's behavior across two distinct time periods to identify changes, trends, or anomalies using Grafana datasource queries.

Instructions

  1. Comparar o comportamento de uma métrica entre dois períodos temporais distintos.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "consulta": "<consulta>",
      "datasource_uid": "<datasource_uid>"
    },
    "name": "grafana_comparar_metricas_periodos"
  }
}

Input Schema

NameRequiredDescriptionDefault
consultaYes
datasource_uidYes
periodo_atual_deNonow-1h
periodo_atual_ateNonow
periodo_anterior_deNonow-2h
periodo_anterior_ateNonow-1h

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.6/5.0
Behavior2/5

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

No annotations exist, so the description carries the full burden, yet it doesn't say this is a read-only query, what happens with an invalid datasource or query, whether the two periods must be non-overlapping, or how the comparison is expressed. An output schema exists, which relieves it of describing return values, but the operational behavior is unstated.

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, but it opens with a stray '38.' enumeration artifact and the brevity reflects under-specification rather than disciplined economy. Adequate, not tight.

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 covers the return-value side, but for a 6-parameter analytical tool with zero schema coverage and no annotations, the description leaves the agent without parameter formats or behavioral guardrails. It is not sufficient to call the tool confidently without inspecting the schema.

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% across six parameters, so the description must compensate and largely does not. The phrase 'dois períodos temporais distintos' hints that the four periodo_* parameters form the two comparison windows, but nothing is said about 'consulta' syntax or the datasource_uid, and the relative-time format is only inferable from defaults like 'now-1h'.

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 ('Comparar') and resource ('o comportamento de uma métrica') plus the comparison axis (two distinct time periods), so the operation is unambiguous. It does not differentiate itself from near-neighbors such as grafana_analisar_tendencias_metricas or grafana_detectar_anomalias_metricas, which keeps it out of 5 territory.

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 to pick this over the many sibling query/analysis tools, no prerequisites (e.g., a valid datasource_uid or a query language), and no exclusions. The agent must infer usage purely from the one-line purpose.

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