Skip to main content
Glama
lukleh

mcp-read-only-grafana

by lukleh

query_loki

Execute LogQL queries against a Grafana Loki datasource to retrieve log entries. Specify connection, datasource UID, query, time range, and optional limit for results.

Instructions

Execute a LogQL query against a Loki datasource.

Args: connection_name: Name of the Grafana connection datasource_uid: UID of the Loki datasource query: LogQL query to execute time_from: Start time in nanoseconds or relative time time_to: End time in nanoseconds or relative time limit: Maximum number of log lines to return

Returns: JSON string with query results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
time_toNo
time_fromNo
datasource_uidYes
connection_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.4.0

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the transparency burden; it states that a query is executed and JSON is returned, but it does not disclose possible side effects, error behavior, or operational constraints like rate limits.

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?

The description is concise, starts with a clear purpose, and uses a compact parameter list with no irrelevant detail.

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?

Given six parameters and no schema descriptions, the description sufficiently covers purpose, parameters, and return type, though it could add examples or note optional defaults.

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

Parameters4/5

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

The Args section in the description defines all six parameters, adding useful semantics such as time format and limit meaning that are absent from the schema.

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

Purpose5/5

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

Description clearly states tool executes LogQL queries against a Loki datasource, distinguishing it from Prometheus or generic explore tools by naming the exact query language and target.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

The LogQL and Loki references give clear context for when to use the tool, but it does not explicitly mention alternatives such as query_prometheus or exclusions.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lukleh/mcp-read-only-grafana'

If you have feedback or need assistance with the MCP directory API, please join our Discord server