Skip to main content
Glama
Grafana MCP Server
by nks1097

grafana_pesquisar_logs

Search structured Loki logs by time range and text filter to isolate relevant events and troubleshoot issues.

Instructions

  1. Pesquisar logs estruturados com filtros temporais e texto no Loki.

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": {
      "seletor_stream": "<seletor_stream>"
    },
    "name": "grafana_pesquisar_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
deNonow-1h
ateNonow
limiteNo
filtro_textoNo
datasource_uidNo
seletor_streamYes

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 are provided, so the description carries the full behavioral burden and fails to: it does not state that this is a read-only query, whether results are truncated by the limit parameter, what Loki time syntax is accepted, or how errors/empty results surface. The only behavioral hint is 'filtros temporais e texto', which the schema already implies via parameter names.

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 filler, but it is under-specified rather than lean, and the leading '41.' is a numbering artifact that carries no meaning for an agent. There is no wasted wording, yet the sentence does too little work for a six-parameter query tool.

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?

For a 6-parameter Loki query tool with zero annotation coverage and zero schema description coverage, the description is far too thin; the presence of an output schema removes the need to describe return values, but everything about input syntax and query semantics is missing.

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%, so the description must compensate and does not. It alludes to time filters and a text filter, but says nothing about the required seletor_stream (LogQL stream selector syntax), the default limit of 50, or when datasource_uid must be supplied.

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?

Names a specific verb (pesquisar) and resource (logs estruturados) and scopes it to Loki with temporal and text filters, which is clear enough for an agent to know broadly what it does. However, it does not distinguish itself from the sibling grafana_consultar_loki, which plausibly queries the same datasource, so sibling differentiation is missing.

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 statement of when to use this tool versus grafana_consultar_loki, grafana_consultar_prometheus, or grafana_identificar_padroes_erro. No prerequisites, no exclusions, and no guidance on what a valid stream selector looks like are given; usage must be inferred entirely.

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