Skip to main content
Glama
sunshinerich

grafana-log-mcp

by sunshinerich

diagnose_issue

Run complete root-cause analysis in one call: detect anomalies, classify error spikes, compare baselines, score candidate causes. Returns diagnostic report with code hints to locate root source.

Instructions

【排障首选】一次调用完成完整根因分析:量级趋势→异常定位→双路径探测(错误突增归并分类 + 无报错基线对比/空值探测/流程断点)→候选原因打分。返回带证据链的诊断报告 + codeHints(供在当前代码仓库中检索定位)。不传 project 则跨全部数据源扫描找疑似源头。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
rangeNo默认 30m
startNo
projectNo项目 key/别名;不传则跨项目扫描
symptomNo现象描述,如"任务没执行"/"接口返回空"/"数据不对",用于提示侧重
baselineOffsetNo默认 1d;prev 为紧邻前窗
Behavior3/5

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

No annotations are provided, so the description carries the burden. It describes the analysis flow and that it returns a diagnostic report with codeHints, but does not explicitly state side effects (e.g., read-only, permissions, rate limits). Given the tool name implies diagnostics, it's likely read-only, but the description doesn't state this. It adds value with the pipeline detail and output, but safety aspects are unaddressed.

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?

The description is a single, dense sentence with a clear pipeline using arrows and parentheses. It's front-loaded with the primary use case. Every phrase adds information, though it's a bit long. No fluff, but could be slightly more concise by trimming redundant details. Structure is logical.

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 the tool's complexity and no output schema, the description explains the return values (diagnostic report with evidence chain and codeHints). It covers the workflow and cross-project behavior. However, it doesn't specify the exact structure of the report or how 'codeHints' are used, but that's acceptable given no output schema. Siblings exist for more granular actions, but this tool seems self-contained. It's fairly complete for a complex tool.

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?

Schema coverage is 67%, and the description adds meaning by explaining the behavior when 'project' is omitted (cross-datasource scan). It also mentions defaults for 'range' and 'baselineOffset' in the schema, but the description reinforces these. The 'symptom' parameter's purpose is explained. For the undocumented 'start'/'end', no extra info, but the description's time-range context helps infer usage. Overall, it adds valuable parameter context, especially for 'project'.

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 clearly states the tool's purpose: a comprehensive root-cause analysis tool for diagnosing issues. It lists the analysis pipeline (trend detection, anomaly localization, dual-path probing, scoring) and distinguishes it from siblings by being the 'first choice for troubleshooting' (排障首选). It's specific about the verb (diagnose) and resource (issues).

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 description provides usage context: it's the preferred tool for troubleshooting, and it specifies that omitting 'project' triggers a cross-datasource scan. However, it doesn't explicitly mention when to use alternatives like query_logs or compare_baseline, though the pipeline implicitly suggests it's a higher-level tool. This is clear but lacks explicit exclusions.

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