Skip to main content
Glama
sunshinerich

grafana-log-mcp

by sunshinerich

trace_context

Restore a complete chronological log chain for a single request using its trace or request ID to diagnose specific failures, returning a compact yet complete result set.

Instructions

按 requestId/traceId 还原单次请求的完整日志链路(时间正序)。定位具体一次失败请求时用它,返回量小且完整。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
rangeNo默认 30m
startNo
labelsNo
projectNo限定项目;不传则扫全部已登记项目
traceIdNo链路追踪 ID
requestIdNo请求 ID(首选)
datasourceUidNo
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 discloses core behaviors: reconstructing the complete log chain for one request, sorting results in chronological order, and keeping the return set small and complete. However, it does not explain precedence when both requestId and traceId are supplied, time-window defaults, or empty/failure behavior.

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 one compact, front-loaded sentence that conveys the operation, the use case, and the output characteristics. There is no filler, repetition, or redundant restatement of the tool name.

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?

With 8 optional parameters, no annotations, and no output schema, the description is usable but thin. It covers the main purpose, ordering, and return size, but omits parameter precedence, default time-window behavior, and how optional filters affect the reconstructed trace.

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 only 50%, and the description adds little beyond restating requestId/traceId as lookup keys. Parameters like start, end, labels, and datasourceUid lack meaningful explanation even in the schema, and the description does not clarify their role or how they interact with the time range.

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?

The description uses a specific verb ('还原') with a clear resource ('完整日志链路'), scoped to a single request via requestId/traceId, and specifies chronological ordering. It also positions the tool for failed-request investigation, distinguishing it from broader log-query siblings.

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?

It explicitly states when to use the tool: '定位具体一次失败请求时用它' (use when locating a specific failed request), and notes the return volume is small and complete. It does not name alternatives or state when not to use it, so it stops short of a full 5.

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

Install Server

Other Tools

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/sunshinerich/grafana-log-mcp'

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